daily pastebin goal
49%
SHARE
TWEET

Untitled

a guest Sep 14th, 2018 59 Never
Upgrade to PRO!
ENDING IN00days00hours00mins00secs
  1. # Display all Users within Active Directory that have been created in the last 30 days
  2.  
  3. Import-module activedirectory
  4.  
  5. $date = get-date
  6.  
  7. $User = Get-ADUser -Filter 'objectclass -eq "User"' -Properties *
  8.  
  9. $User | Where-Object {$_.whencreated -gt $date.adddays(-30)} |
  10.  
  11. Sort-Object -Property whencreated |
  12.  
  13. Select samaccountname,whencreated,LastLogonDate,Enabled
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top