i have about 250 mailbox in one storage group. what i need is to get the user names associated with these accounts & pipe them into a csv file using powershell. i am not an advanced pshell user so can you please advice me of a code that could use for this task?
by JasonHelmick at 2013-02-15 09:00:17
I don;t have Exhcnage available at my finger tips, but try something like this:
Get-MailBox -Database | Select-Object -property name | Export-csv c:\
by DonJ at 2013-02-16 07:07:42
FYI: In the future, please try to give your posts a title that better describes what you are asking. "Urgent request for code" could be anything; "Need to get mailbox names" would help the right expert notice your post more quickly.
by ogaal at 2013-02-18 04:32:42
thanks for for the help... i have tried running the above command but it does not return anything.......
DonJ you are right. thanks for the advice. i will post another one with an appropriate tittle.
by JasonHelmick at 2013-02-18 07:21:55
I should have asked this first...what version of exchange or you running?
by ogaal at 2013-02-18 08:11:19
by JasonHelmick at 2013-02-18 08:35:19
Thanks! The above example does in fact work on 2007.....can you show me what your typing? Here's what I just did on a 2007 box:
I tested jasons code and i can confirm that it works without problems.
One thing that comes in mind is, does your powershell session run with enough rights to do what you wanna do? Cause i sometimes forget about running it with my exchangeadmin account and run into an error that goes like:
"Get-Mailbox : Database "Server\Storage\database" was not found. Please make sure you have typed it correctly."