Learn about Windows PowerShell
Summary: Use Windows PowerShell to easily find disabled user accounts in Active Directory.
How can I use Windows PowerShell to find disabled user accounts in Active Directory?
Use the Search-ADAccount cmdlet from the Active Directory module:
and this is another way
Get-ADUser -Filter (enabled -ne $true)
one way too fool everyone eh Khalid!!
This gives disabled computer accounts too.
@Khalid Alghamdi yes that works. Great suggestion.
@Steve yes this would also give disabled computer accounts. @Khalid has a great suggestion to filter out only users.
@Khalid: thanks for the tip. Now I can use "-properties homedirectory" to get a list of disabled users and their homedirectory
So... what module(s) needs to be imported for either get-aduser or search-adaccount to work?
ah, so I am dumb:
...answering my own stupid questions