Scenario: You have a list of username’s in a .csv file with a column header labeled: name. You want to quickly determine which usernames have a Mailbox and RemoteMailbox.
Script:
Import-module ActiveDirectory $Members = Import-csv C:sharecvusers.csv | Select -ExpandProperty Name $Members = $Members | Sort $Members_OnPrem = @() $Members_o365 = @() $Members | %{ "$_" $type = Get-ADUser $_ -properties msExchRecipientTypeDetails | Select -ExpandProperty MSexchRecipientTypeDetails If ($type -eq "1"){$Members_OnPrem += $_} If ($type -eq "2147483648"){$Members_o365 += $_} }
Its really serious, you are the author of a very qualified. I signed up and added to your personal feed will enjoy the wonderful write-ups are finding.
IT support Dallas
LikeLike