cawasaki
asked on
Export Active directory attribute for user and 3 exchange attribute in the same export
Hi,
I need to export this attribute of AD users in csv file:
name, givenName, sn, Mail, telephoneNumber, facsimileTelephoneNumber, department, title, physicalDeliveryOfficeName , streetAdress, postOfficeBox, postalCode
In the same export, i need this 3 Exchange value: CustomAttribute1, CustomAttribute3, CustomAttribute4
Thanks for your help.
I need to export this attribute of AD users in csv file:
name, givenName, sn, Mail, telephoneNumber, facsimileTelephoneNumber, department, title, physicalDeliveryOfficeName
In the same export, i need this 3 Exchange value: CustomAttribute1, CustomAttribute3, CustomAttribute4
Thanks for your help.
Here you are, Windows Server 2008 R2 version
function str {$args}
$attribs = str name, givenName, sn, Mail, telephoneNumber, facsimileTelephoneNumber, department, title, physicalDeliveryOfficeName, streetAddress,
postOfficeBox, postalCode, extensionAttribute1, extensionAttribute2, extensionAttribute4
Get-ADUser -Filter * -Properties $attribs | Select-Object -Property $attribs | Export-Csv -Path c:\yourfile.csv -NoTypeInformation
ASKER
Hi,
I am in Windows 2008 SP2 and Exchange 2007 sP1.
I now i can sort all this attribute with Get-ADUser, but i need to include th eexchange attribute CustomAttribute1, CustomAttribute3, CustomAttribute4.
thanks for your help
I am in Windows 2008 SP2 and Exchange 2007 sP1.
I now i can sort all this attribute with Get-ADUser, but i need to include th eexchange attribute CustomAttribute1, CustomAttribute3, CustomAttribute4.
thanks for your help
Quest AD Snapin version:
function str {$args}
$attribs = str name, givenName, sn, Mail, telephoneNumber, facsimileTelephoneNumber, department, title, physicalDeliveryOfficeName, streetAddress,
postOfficeBox, postalCode, extensionAttribute1, extensionAttribute2, extensionAttribute4
Get-QADUser -IncludedProperties $attribs | Select-Object -Property $attribs | Export-Csv -Path c:\yourfile.csv -NoTypeInformation
ASKER
and the problem when i use qet-qaduser to export extensionAttribute1, it export them blank!
You have them in my first solution.
And also in the Quest version.
ASKER
Ok, quest version work, but i have 10000 user and the export stop in 1000 first user.
how i can execute this script forum unlimited user?
how i can execute this script forum unlimited user?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
work perfectly thanks man:)
Type in this
import-module ActiveDirectory
Press Enter
Now type in this
Get-ADUser -Filter * -SearchBase "DC=YOURDOMAIN,DC=COM" -Properties * | Select-Object SamAccountName,GivenName,S
I don't use the custom Exchange values, but you can find it by typing this:
Get-ADUser USERNAME -Properties *