Reputation: 941
I am trying to find AD Users that are enabled or disabled with Powershell Get-ADUser and I get an odd result. I know I have 30 disabled users in the Server Admin GUI, because every time I disable one I move it to a "Disabled OU". When I run
(Get-AdUser -filter * |Where {$_.enabled -eq "True"}).count
I only get a value of 10
When I run
(Get-ADUser -filter * |Where {$_.enabled -ne "False"}).count
I get a value of 110
Something is not right as I know I have 30 disable users. When I run
Get-ADUser -filter *
Some users are not even using the field "Enabled". How can I get a list of Enabled or Disabled Users when some are not even using the field?
Upvotes: 0
Views: 3463
Reputation: 51
Try again from an Elevated PowerShell Command Prompt (Run as Administrator). See if the blanks go away when you run:
Get-ADUser -Filter * -Property Enabled | FT Name, Enabled -Autosize
Upvotes: 1