Extracting custom attribute data
Hello, I need help to extract some data from AD. I have no problem extracting data from the default AD fields. I have difficulty extracting Exchange data stored in custom attributes. The data i need is stored in extensionAttribute1. How do i get this and export to csv.?
June 4th, 2010 4:11pm

Exchange 2003
Free Windows Admin Tool Kit Click here and download it now
June 4th, 2010 7:31pm

Using Powershell, and the Quest AD cmdlets: get-qaduser <useraname> -includeallproperties | select displayname,extenionattribute*[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
June 4th, 2010 7:48pm

Sorry, I noticed you only want extensionattribute1, so: get-qaduser -sizelimit 0 -includedproperties extensionattribute1 | select displayname,extensionattribute1 | export-csv ext_att1.csv -notype [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
June 4th, 2010 7:52pm

Hi mjolinor, This looks good so far. What I actually need are these : firstname, last name, phone(business 1), email, extensionattribute1 So how will the powershell script look like now? Thank you very much for your patience
June 4th, 2010 8:55pm

The rest of the properties are already included in the default property set, so: get-qaduser -sizelimit 0 -includedproperties extensionattribute1 | select firstname,lastname,phonenumber,email,extensionattribute1 | export-csv ext_att1.csv -notype[string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
June 4th, 2010 9:13pm

You have been most helpful...i guess it's time for me to learn some powershell. Any thoughts on where to begin?
June 4th, 2010 9:23pm

This is the original (V1) documentation pack. It's available for download for easy offline reading. It's a good basic primer in Powershell. http://www.microsoft.com/downloads/details.aspx?familyid=B4720B00-9A66-430F-BD56-EC48BFCA154F&displaylang=en [string](0..33|%{[char][int](46+("686552495351636652556262185355647068516270555358646562655775 0645570").substring(($_*2),2))})-replace " "
Free Windows Admin Tool Kit Click here and download it now
June 4th, 2010 9:29pm

Once again, thank you
June 4th, 2010 9:53pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics