Export user specific attribute


Import-Csv C:\\Hindalco\Users.csv | foreach { Get-ADUser -Identity $_.samaccountname -Properties * } | Select SamAccountName, @{N=”Business”;E={$_.Business -join “,”}} , Company, ExtensionAttribute2, ExtensionAttribute3 | Export-Csv -NoTypeInformation C:\Hindalco\Gyanodayabackup.csv

Note:

Create Users.csv file in the below format:

Samaccountname
aarti.achhpillia

In this script using SAM account I have pull other attributes including multiple values.

ExtensionAttribute2,ExtensionAttribute3 is additional attributes check this values manually via attribute editor.

 

Advertisements

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 )

Twitter picture

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

Facebook photo

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

Google+ photo

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

Connecting to %s

%d bloggers like this: