AD csv dump, exchange 2007 shell user import

csvde -f output.csv -r  objectclass=user
then further customize the columns in excel and save again as csv.

benny sent me this powershell script and the link (for further info):

Import-CSV “C:\NewUsers.csv” | ForEach-Object -Begin {$Temp = ConvertTo-SecureString “P@ssword1” -asPlainText -Force} -Process {New-Mailbox -Name $_.Name -UserPrincipalName “$($_.UserName)@mydomain.local” -OrganizationalUnit “mydomain.local/Users” -Database “Exch07\Mailbox Database” -Password $Temp -ResetPasswordOnNextLogon $true}

http://technet.microsoft.com/en-us/library/bb310752%28EXCHG.80%29.aspx

update 1/10/2011:
csv dump a particular OU
csvde -f output.csv -d “OU=myou,DC=mydomain,DC=com”

or get just the user info with dsquery
dsquery user * ou=myou,dc=mydomain,dc=com -limit 0 > dump.txt
i believe there’s a typo in the above…the following works:
dsquery * ou=myou,dc=mydomain,dc=com -attr sAMAccountName userPrincipalName -limit 0 > dump.txt
however just returning the two specified attributes

This entry was written by resinblade , posted on Tuesday January 12 2010at 06:01 pm , filed under IT . Bookmark the permalink . Post a comment below or leave a trackback: Trackback URL.

Comments are closed.