Test2

soms heb je ook test 2 nodig

hierbij het script

Connect-MsolService
Connect-ExchangeOnline

$a = get-msoluser -all
$b = get-msoluser -all -returndeletedusers
$c = get-msolgroup -all
$d = get-msolcontact -all
$e = get-recipient -resultsize unlimited
$all = $a + $b + $c + $d + $e
$search = "NewMedia2Day"
$all | ? { $_.emailaddresses -match $search -or $_.emailaddress -match $search -or $_.userprincipalname -eq $search -or $_.proxyaddresses -match $search }

$all | Export-Csv -NoTypeInformation c:\temp\nm2d.csv

Leave a Reply

Your email address will not be published. Required fields are marked *