RSS

useful AD user information report

02 Jun
  1. get one user;s information especially list all proxy-address in one column

 Get-ADUser yangxun -Properties displayname,company,department,samaccountname,mail,distinguishedname,proxyaddresses,extensionAttribute1,extensionAttribute15 | select displayname,company,department,samaccountname,mail,distinguishedname,@{name=’proxyaddress’;expression={$_.proxyaddresses -join “;”}},extensionAttribute1,extensionAttribute15
    

 Get-ADUser yangxun -Properties OfficePhone,Title,Office,StreetAddress,City,PostalCode,MemberOf,DisplayName,Company,Department,SamAccountName,mail,DistinguishedName,proxyAddresses,extensionAttribute1,extensionAttribute10,extensionAttribute15,EmployeeID,EmployeeNumber | select OfficePhone,Title,Office,StreetAddress,City,PostalCode,@{name=’group’;expression={$_.MemberOf -join “;”}},DisplayName,Company,Department,SamAccountName,mail,DistinguishedName,@{name=’proxyaddress’;expression={$_.proxyaddresses -join “;”}},extensionAttribute1,extensionAttribute10,extensionAttribute15,EmployeeID,EmployeeNumber | fl

get all user’s information especially list all proxy-address in one column

Get-ADUser -filter *  -Properties displayname,company,department,samaccountname,mail,distinguishedname,proxyaddresses,extensionAttribute1,extensionAttribute15 | select displayname,company,department,samaccountname,mail,distinguishedname,@{name=’proxyaddress’;expression={$_.proxyaddresses -join “;”}},extensionAttribute1,extensionAttribute15 | Export-Csv D:\alluseri.csv
    
Get-ADUser -Filter * -Properties  OfficePhone,Title,Office,StreetAddress,City,PostalCode,MemberOf,DisplayName,Company,Department,SamAccountName,mail,DistinguishedName,proxyAddresses,extensionAttribute1,extensionAttribute10,extensionAttribute15,EmployeeID,EmployeeNumber | select OfficePhone,Title,Office,StreetAddress,City,PostalCode,@{name=’group’;expression={$_.MemberOf -join “;”}},DisplayName,Company,Department,SamAccountName,mail,DistinguishedName,@{name=’proxyaddress’;expression={$_.proxyaddresses -join “;”}},extensionAttribute1,extensionAttribute10,extensionAttribute15,EmployeeID,EmployeeNumber | export-csv D:\newdata20121026.csv

Advertisements
 
1 Comment

Posted by on June 2, 2013 in others

 

One response to “useful AD user information report

  1. janek

    December 18, 2015 at 15:00

    Hi, I used your code and I have command: Get-ADUser -Filter * -SearchBase ‘DC=ju,DC=com’ -Properties company,proxyaddresses | select company, @{L=’ProxyAddress’; E={$_.proxyaddresses -join”; “}} RESULT is column Company (two char) and Column proxyaddresses (there are all values). I need only value SMTP:xxx@xxx. Other values with small smtp:yyy@yyy I do not need. Thanks

     

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

w

Connecting to %s

 
%d bloggers like this: