Quantcast
Channel: PowerShell.com – PowerShell Scripts, Tips, Forums, and Resources
Viewing all articles
Browse latest Browse all 6937

Find Active Users & .....

$
0
0

Find Active Users that have "change password at next logon".     That is what I need to do.  

I have this code:  

Get-ADUser-LDAPFilter"(&(sAMAccountName=b*)(!userAccountControl:1.2.840.113556.1.4.803:=2))" `

 

 

-PropertiessAMAccountName,givenName,sn,enabled|SelectsAMAccountName,givenName,sn,enabled| `

 

 

Export-Csv-Pathc:\Temp\ActiveUsers2.csv-NoTypeInformation

but when I run this it only finds 300 users.   We have at least 1,500 active users.   how do I get this to show me ALL active (enabled) users that have "change password at next login" set?


Viewing all articles
Browse latest Browse all 6937

Trending Articles