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

DCOM received error "2147746132" from...

DFSR RPC replication errors 5014 1726 with large files over VPN

ADFS 3.0 Event ID 4625 | An Error occurred During Logon | Status: 0xC000035B