#Connect to Exchange Online.
Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope LocalMachine -Force;
Install-PackageProvider -Name NuGet -Force;
Set-PSRepository -Name "PSGallery" -InstallationPolicy Trusted;
Install-Module -Name ExchangeOnlineManagement;
Import-Module ExchangeOnlineManagement;
Connect-ExchangeOnline;
mkdir $env:temp\o365; cd $env:temp\o365;
$mailbox = read-Host 'Mailbox address:'
Get-InboxRule -Mailbox $mailbox | Select Name, Description, Enabled | Sort Name | Out-GridView;
Get-InboxRule -Mailbox $mailbox | Select Name, Description, Enabled |
Export-CSV $env:temp\o365\Report.csv -NoTypeInformation -Encoding UTF8;
ii $env:temp\o365;
.\Report.csv
#End
5/5 - (1 vote)