Find account that expire in 'x' days and display additional properties


hello all, 

i able identify users have expiring password using following:

search-adaccount -accountexpiring -timespan 14.00:00:00

that works great.  however, call additional properties , display well, in particular 'description' property get-aduser cmdlet.  is possible run search-addaccount cmdlet, , pipe results get-aduser cmdlet retrieve desired results.  or, perhaps there way together?

thank in advance assistance!!

regards,
b-

brian

yes, piping results get-aduser best way go:

search-adaccount -accountexpiring -timespan 14.00:00:00 | % {get-aduser $_ -properties description}


tony www.activedir.org blog:www.open-a-socket.com



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

Group Policy Event ID 1058 Error Code 1326 (The user name or password is incorrect)

Suspicious event log Event ID: 4905

DCOM received error "2147746132" from...