Link to home
Start Free TrialLog in
Avatar of RawsonIT
RawsonIT

asked on

How to get AD user that does not have Picture and exclude the disable users

Hi I need to get a list of users with no photos in AD but I need to exclude all the disable users
this is what I have done, definitely something is wrong with the second query Enable -eg $True.

Any help please

Get-ADUser -Filter * -Properties thumbnailPhoto | Where-Object {$_.thumbnailPhoto -eq $Null -and Enabled -eq $True} | FT sAMAcoountName,Name
ASKER CERTIFIED SOLUTION
Avatar of footech
footech
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial