Scenario: You have a list of mailboxes that you do not know if they still exist or not. Instead of checking one by one, you can script this.
In my users.csv I have a header with Name that contains all of the aliases underneath.
$users = Import-csv C:users.csv
$users | ForEach { $exist = [bool](Get-mailbox $_.name -erroraction SilentlyContinue); Write-host “$Exist $_.Name”}
Thank you very much for posting this.
LikeLike