Retrieve mailbox database and server for each user
Does anyone know a powershell command I can use to retrieve the database and Exchange server each user resides based on the display name I have in Excel sheet?ms
April 26th, 2012 12:50pm
Hi there,
How about just getting that data from Powershell and exporting to a spreadsheet? In Powershell:
Get-Mailbox -resultsize unlimited |select DisplayName, ServerName, Database |Export-CSV x:\yourfile.csv
That should work for you
Oliver Moazzezi | Exchange MVP, MCSA:M, MCITP:Exchange 2010, BA (Hons) Anim | http://www.exchange2010.com | http://www.cobweb.com | http://twitter.com/OliverMoazzezi
Free Windows Admin Tool Kit Click here and download it now
April 26th, 2012 12:57pm
Oliver but I have 82,000 users in the environement, I just need for attributes for about 400 users in the excel file. That will just take much longer. I need to retrieve these attributes based on the excel sheet I have, on the display name etc.ms
April 26th, 2012 1:06pm
What does your excel spreadsheet have in it? If it's just usernames, I'd strip out that column and do a txt file instead
get-content c:\myfile.txt |
get-mailbox | select DisplayName, ExchangeServer, Database |Export-CSV x:\yourfile.csv
Mike Crowley | MVP
My Blog --
Planet Technologies
Free Windows Admin Tool Kit Click here and download it now
April 26th, 2012 2:35pm
Hello,
I think the following thread must be helpful:
http://social.technet.microsoft.com/Forums/da-DK/exchangesvradmin/thread/50617b55-95cd-4dab-8043-259caa9e1f8d
Thanks,
Simon
April 27th, 2012 4:20am
Morning,
As Mike says if you need it for just a certain amount of users from an existing spreadsheet, take these users and paste into a new CSV file. From there
Get-Content "x:\yourfile.txt/csv" | Get-Mailbox |select, DisplayName, ServerName, Database
You can of course still output it to a file adding |Export-CSV "x:\outputfile.csv"
You can then open this and put the data back into your master spreadsheet.
Hope that helps dude. Take care.
Oliver Moazzezi | Exchange MVP, MCSA:M, MCITP:Exchange 2010, BA (Hons) Anim | http://www.exchange2010.com | http://www.cobweb.com | http://twitter.com/OliverMoazzezi
Free Windows Admin Tool Kit Click here and download it now
April 27th, 2012 5:34am