Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Display all Users within Active Directory that have been created in the last 30 days
- Import-module activedirectory
- $date = get-date
- $User = Get-ADUser -Filter 'objectclass -eq "User"' -Properties *
- $User | Where-Object {$_.whencreated -gt $date.adddays(-30)} |
- Sort-Object -Property whencreated |
- Select samaccountname,whencreated,LastLogonDate,Enabled
Add Comment
Please, Sign In to add comment