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

thanks azam when see answers please mark answer if helpful..vote helpful.



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Round Robin is killing performance on our network

WMI Repository 4GB limit - Win 2003 Ent Question

Change home folder default permission?