Find AD Users whose specific attribute is null (empty)

The following PS code brings the users whose userprincipalname field is empty

 

Get-ADUser -Filter * -properties userprincipalname | where userprincipalname -eq $null | Format-Table -Property Name

© selimatmaca.com. All Rights Reserved.