Show ad-user properties

Prosper's picture
Forums: 

Get-ADUser -filter * -Properties displayname,city,Office,Homephone,mobilephone,officephone,title |out-gridview

 

 

Prosper's picture

To add the member of information to the csv is a bit tricky:

get-aduser -Filter * -Properties *  | select name, title, city, office, mobilephone, homephone, manager, created, modified, lastlogondate, badlogoncount, LastBadPasswordAttempt, emailaddress, @{Name="MemberOf";Expression={$(Get-ADPrincipalGroupMembership $_).Name -Join ";"}} | Export-csv ("C:\Scripts\Audit\" + (Get-Date -format "yyyy-MM-dd HH-mm") + " User-audit.csv") -NoTypeInformation