by Christopher.Ellis at 2013-04-26 10:07:43
I want to run a quick powershell script which reports all users names in our active directory with empty emailaddress fieldby Christopher.Ellis at 2013-04-26 10:24:46
I would start the command with get-aduser however the rest not known to me. List produced would be username Populate and emailaddress would be empty.
Thank you
get-aduser -property ‘emailaddress’ | select-object -property name, emailaddressby Martin9700 at 2013-04-26 10:30:03
I got this far, however if I wanted to state emailaddress = empty display name the above command gets all accounts
Kind of a goofy one, evidently Get-ADuser doesn’t recognize the $null variable within a filter but I found this to work:by Christopher.Ellis at 2013-04-26 10:41:29Get-ADUser -Filter {EmailAddress -notlike "*"} -Properties EmailAddress | Select Name
Thank you