change user
i have a script below , works fine find user , if want find user user account was created within 3 days , can ?
get-qaduser -accountexpiresbefore $fortnight -searchroot "ou=users,dc=domain,dc=domain" | select-object accountexpires, description | export-csv c:\expiringaccounts.csv
$date = (get-date).adddays(-3)
get-qaduser | where{$_.whencreated -ge $date} | select-object accountexpires, description | export-csv
get-qaduser | where{$_.whencreated -ge $date} | select-object accountexpires, description | export-csv
thanks azam when see answers please mark answer if helpful..vote helpful.
Windows Server > Windows PowerShell
Comments
Post a Comment