Quantcast
Channel: Software Communities : Popular Discussions - ActiveRoles
Viewing all articles
Browse latest Browse all 1277

How to query AD for a list of users who are Active ONLY

$
0
0

Hi, i would like to query AD using powershell to get a list of all our users that are active, etc. However when i run the query, i receive all users that are both disabled and active. What is the query to show me only ACTIVE?

 

This is what i have so far...

 

Add-PSSnapin Quest.ActiveRoles.ADManagement

Get-QADUser -objectAttributes @{employeeID='*'} | select-Object firstname, lastname, employeeID, email, sAMAccountName, AccountisDisabled="false" | Export-Csv "C:\SUS-HR-DATA\Email_Address_Export\Email_Address_Export.csv" -NoTypeInformation

 

I have tried to substitute "AccountisDisabled" with multiple suggestions from online (edsaAccountIsDisabled, etc), but no luck.

 

Thanks,

Artie


Viewing all articles
Browse latest Browse all 1277

Trending Articles