This PowerShell script replicates the basic functionality of my Exchange Mailbox export HTA script. Rather quickly, it exports the following values (for all accounts with an email address) :
- First name (givenname)
- Last name (sn)
- Distinguished name
- Primary SMTP Address (mail)
- User Logon name (userprincipalname)
- User Logon name "Pre-Windows 2000" (sAMAccountName)
- All secondary email addresses (proxyaddresses)
get-qaduser -dontusedefaultincludedproperties -ObjectAttributes @{mail='*'} -includedproperties sAMAccountName,employeeid,distinguishedname,mail,userprincipalname,givenname,sn,proxyaddresses -searchroot 'corp.ent/SBSUsers/_A - G' -serializevalues -sizelimit 0 | export-csv 'c:\Accounts_mail_A-G.csv'
To run this script, you will need to download and install the latest Quest tools. If you would like to include or change the fields (GivenName, employeeID, etc.) it pulls, don't expect to pull all the user properties as defined by:
Get-QADUser -IncludeAllProperties -ReturnPropertyNamesOnly
I kept trying, but getting only a few fields. Looked like I would get up to the first field that it could not query, then would drop the rest in the request. It appears to want the LDAP equivalents. Maybe I was just phrasing my query wrong, but I still can't pull the 'initials' value for anyone (and I know it is populated.)
I have recently revised this script that exports a few more fields from specific OUs.
Comments
pMlGFU qfslbgmpxhhm,
pMlGFU qfslbgmpxhhm, [url=http://viudleojwuts.com/]viudleojwuts[/url], [link=http://mqcqqsspdwoq.com/]mqcqqsspdwoq[/link], http://tnslboongnkf.com/
Post new comment