Getting and setting email forwarding using the ExchangeOnlineManagement Module for PowerShell.
PowerShell Code
Get
Note: This code requires the Exchange Online Management module.
Set
Note: This code requires the Exchange Online Management module.