Last active
December 3, 2021 17:42
-
-
Save Trimad/b2a3e1c943a4b462597cac6165b1b7c3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Get connected to Exchage Online Management | |
Import-Module ExchangeOnlineManagement | |
Connect-ExchangeOnline -UserPrincipalName <UPN> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Search the RSS folders of all OWA users | |
$All = Get-Mailbox -ResultSize Unlimited | |
$Result=@() | |
$All | foreach { | |
$obj =Get-MailboxFolderStatistics -Identity $_.Identity | Where {$_.Identity -match "RSS"} | select Identity,ItemsInFolderAndSubfolders,FolderAndSubfolderSize,LastModifiedTime | |
Write-Output $obj | |
$Result += $obj | |
} | |
$Result | Export-CSV "output.csv" -noType |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#Search the rules of all OWA users | |
#This dumps all rules for all users into a .csv file. You can search the CSV for things like "RSS" or "move the message to folder" to quickly identify malicous rules. | |
$All = Get-Mailbox -ResultSize Unlimited | |
$Result=@() | |
$All | foreach { | |
$obj =Get-InboxRule -Mailbox $_.Identity | |
Write-Output $obj | |
$Result += $obj | |
} | |
$Result | Export-CSV "output.csv" -noType |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment