Export-Mailbox Not Working Anymore
Martina_Miskovic, yeah, nothing has changed. I have always been using Exchange 2010 SP1. Export-Mailbox was working ever since we started running Exchange 2010 and all of a sudden it will not run. There had been no major updates between the time it was and was not working. I looked into using New-MailboxExportRequest and am getting the same error.
December 24th, 2011 12:12pm

Satheshwaran Manoharan, I have done that and still get the same error.
Free Windows Admin Tool Kit Click here and download it now
December 24th, 2011 12:13pm

V I S H A L, I am running the console on the same machine.
December 24th, 2011 12:14pm

Here is my script: Get-User | where { $_.Company -ilike "BGCAC*" } | Export-Mailbox -PSTFolderPath E:\PST1 -BadItemLimit 1000 -Confirm:$False -StartDate "05/14/2011 12:01:00" This was working for me about a month ago. Now it is giving me this error: [PS] C:\Windows\system32>Get-User | where { $_.Company -ilike "BGCAC*" } | Export-Mailbox -PSTFolderPath E:\PST1 -BadItemLimit 1000 -Confirm:$False -StartDate "05/14/2011 12:01:00" The term 'Export-Mailbox' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again. At line:1 char:65 + Get-User | where { $_.Company -ilike "BGCAC*" } | Export-Mailbox <<<< -PSTFolderPath E:\PST1 -BadItemLimit 1000 -Confirm:$False -StartDate "05/14/2011 12:01:00" + CategoryInfo : ObjectNotFound: (Export-Mailbox:String) [], CommandNotFoundException + FullyQualifiedErrorId : CommandNotFoundException Nothing has been changed. Any thoughts? If you have any questions for further info let me know.
Free Windows Admin Tool Kit Click here and download it now
December 24th, 2011 1:31pm

Martina_Miskovic, yeah, nothing has changed. I have always been using Exchange 2010 SP1. Export-Mailbox was working ever since we started running Exchange 2010 and all of a sudden it will not run. There had been no major updates between the time it was and was not working. I looked into using New-MailboxExportRequest and am getting the same error. Export-mailbox was replaced by New-MailboxExportRequest in SP1, so you couldn't have used that command, unless you were on RTM. I would recommend you to read Steve Goodmans blogpost. It has a lot of good and useful information about the subject. http://www.stevieg.org/tag/export-pst/ It you can't get it to work, post a picuture of the error you are getting. Martina Miskovic - http://www.nic2012.com/
December 24th, 2011 2:02pm

You say nothing has changed... So I guess it not worth asking if you are on Exchange 2010 SP1/SP2.. (cause if you were, then the command to use would be New-MailboxExportRequest and not Export-Mailbox)Martina Miskovic - http://www.nic2012.com/
Free Windows Admin Tool Kit Click here and download it now
December 24th, 2011 2:40pm

On Thu, 22 Dec 2011 19:37:12 +0000, Martina_Miskovic wrote: >You say nothing has changed... So I guess it not worth asking if you are on Exchange 2010 SP1/SP2.. (cause if you were, then the command to use would be New-MailboxExportRequest and not Export-Mailbox) Which would more than imply that *something* changed! --- Rich Matheisen MCSE+I, Exchange MVP --- Rich Matheisen MCSE+I, Exchange MVP
December 24th, 2011 6:09pm

New-MailboxExportRequest Introduced on Exchange 2010 Sp1 and Sp2 Add yourself as member of this role to have this command work New-Managementroleassignment -Role "Mailbox Import Export" -User "administrator"
Free Windows Admin Tool Kit Click here and download it now
December 24th, 2011 6:13pm

Hope you are running this cmds on machine where Exchange mgmt console installed. Try this below first on Powershell console and then run your script. Add-PSSnapin Microsoft.Exchange.Management.PowerShell.Admin Hope this helps. Vishal Ramnani MCITP - Exchange 2007, MCSE Messaging, MCTS - Win 2008 Config
December 25th, 2011 12:55am

I followed as best as I could and got this. No errors just blank entry. I tried saving them 1) to an external hard drive for portable access and 2) to a shared spot on the server.
Free Windows Admin Tool Kit Click here and download it now
December 30th, 2011 11:59am

I followed as best as I could and got this. No errors just blank entry. I tried saving them 1) to an external hard drive for portable access and 2) to a shared spot on the server. What was the result ? were any PST files created in the specified locations ?Network+,Security+,NCSA,MCTS,MCPS,And MCITP
December 30th, 2011 11:34pm

Ok, exporting to PST via powershell or another machanism isn't really intended to be a backup mechanism. You should search for "Exchange 2010 backup" on your search engine of choice *cough*Bing*cough* for that. I do understand why soem organizations might additionally want to do a PST export as an additional safety measure, but it's not really what you want to go to as your first choice. So it sounds like it is a small org. With that, is 20 all the mailboxes in the org, if so you don't need to filter at all: foreach ($i in (Get-Mailbox)) { New-MailboxExportRequest -Mailbox $i -FilePath "\\AZUA\Exports\$($i.Alias).pst" } Or look at the example whihc uses a csv file for source, perhaps that would work for you?
Free Windows Admin Tool Kit Click here and download it now
January 3rd, 2012 10:11pm

OK. If you want to create PST-files for all your mailboxes you can run this: foreach ($i in (Get-Mailbox)) { New-MailboxExportRequest -Mailbox $i -FilePath "\\SERVER\SHare\$($i.Alias).pst" }Martina Miskovic - http://www.nic2012.com/
January 3rd, 2012 10:11pm

Nothing, it sits there with >>. No files were created.
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2012 12:13pm

Hi, You need to use a different filter. You can't use Company since that attribute is not part of get-mailbox. In the above picture it looks like you typed --> ${$i.Alias).pst" } instead of $($i.Alias).pst" } Martina Miskovic - http://www.nic2012.com/
January 28th, 2012 1:22pm

I am trying to find the different attribute but cannot. What attribute would I give so that a select few will be exported? I feel like this is quite the process for backing up .pst files. Is there a better way that I do not know about. I am pretty new to the Exchange program.
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2012 1:37pm

Sure, It's a quite a process so why are you doing it? What's your goal with it? Martina Miskovic - http://www.nic2012.com/
January 28th, 2012 1:42pm

I am creating about 20 .pst files for my organization. The reason is to have a backup just in case of a server crash and I have to rebuild again. The way it was set up was the exchange program is on one server and the database is on another. It was set up like that before I got here.
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2012 2:00pm

I don't understand what you mean with: "the exchange program is on one server and the database is on another" So are you saying that in your organization you don't run any exchange aware backups, but instead rely on PST-backups? Martina Miskovic - http://www.nic2012.com/
January 28th, 2012 2:05pm

we run exchange on server1 (the roles say Hub Transport, Client Access, Mailbox) and all of the mailboxes were moved to server2 (role is Mailbox) There was no back up mode in place so this was the first thing I could think of.
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2012 2:10pm

Ok, exporting to PST via powershell or another machanism isn't really intended to be a backup mechanism. You should search for "Exchange 2010 backup" on your search engine of choice *cough*Bing*cough* for that. I do understand why soem organizations might additionally want to do a PST export as an additional safety measure, but it's not really what you want to go to as your first choice. So it sounds like it is a small org. With that, is 20 all the mailboxes in the org, if so you don't need to filter at all: foreach ($i in (Get-Mailbox)) { New-MailboxExportRequest -Mailbox $i -FilePath "\\AZUA\Exports\$($i.Alias).pst" } Or look at the example whihc uses a csv file for source, perhaps that would work for you?
January 28th, 2012 2:17pm

OK. If you want to create PST-files for all your mailboxes you can run this: foreach ($i in (Get-Mailbox)) { New-MailboxExportRequest -Mailbox $i -FilePath "\\SERVER\SHare\$($i.Alias).pst" }Martina Miskovic - http://www.nic2012.com/
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2012 2:17pm

It just says version 14.0 just like the screen shot ^^
January 28th, 2012 2:25pm

I didn't see the second screenshoot the other day :) 14.0 means that you are on Exchange 2010 RTM, which is not supported anymore. Martina Miskovic - http://www.nic2012.com/
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2012 2:30pm

This will just export the mailboxes and not the contacts? I just want the mailboxes. Also do I have to use a share folder? I would ultimately like the .pst files to go on an external drive for easier use. Thanks for all your help.
January 28th, 2012 2:33pm

Mailcontacts doesn't have any data in Exchange, so there isn't anything for those to export. Get-Mailbox is just mailboxes :) Yes, you need to use an UNC-path (=shared folder)Martina Miskovic - http://www.nic2012.com/
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2012 2:37pm

Well, I am at a non profit and it was new to us as of May 2011. Guess I need to go shopping.
January 28th, 2012 2:45pm

Well, I am at a non profit and it was new to us as of May 2011. Guess I need to go shopping. Shopping for free is fun :) Microsoft Exchange Server 2010 Service Pack 2 (SP2) http://www.microsoft.com/download/en/details.aspx?id=28190Martina Miskovic - http://www.nic2012.com/
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2012 2:47pm

Still getting an error
January 28th, 2012 2:48pm

Do you have SP1 installed or not? Since you have mentioned that you always has run export-mailbox before, I must ask. Aslo, did you follow the instructions in Steve Goodmans Blogpost??Martina Miskovic - http://www.nic2012.com/
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2012 2:50pm

I do have SP1 Installed and yes I did follow the steps and the folder is shared correctly. From the errors it appears that it is not recognizing the new-mailboxexportrequest.
January 28th, 2012 2:56pm

Does sound like a permission issue. What do you get if you run: Get-ManagementRoleAssignment -Role "Mailbox Import Export"Martina Miskovic - http://www.nic2012.com/
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2012 2:59pm

shows that I have direct assignment method. with a user for asigneetype
January 28th, 2012 3:05pm

Can you post the output?Martina Miskovic - http://www.nic2012.com/
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2012 3:06pm

Don't ask about the Mickey Mouse username :)
January 28th, 2012 3:17pm

I can't see anything wrong in the output. You did close and open a new EMS after you ran New-ManagementRoleAssignment –Role “Mailbox Import Export” –User DOMAIN\samaccountnameMartina Miskovic - http://www.nic2012.com/
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2012 3:30pm

Here is another interesting thing I just found. I switched to another username on that list and ran Get-User | where { $_.Company -ilike "BGCAC*" } | Export-Mailbox -PSTFolderPath E:\PST1 -BadItemLimit 1000 -Confirm:$False -StartDate "05/14/2011 12:01:00" and it worked. So now it is working but with no explanation. if I run the script on task scheduler it does not run though, but that is another forum I think.
January 28th, 2012 3:40pm

That doesn't make sence if you have SP1 installed.Martina Miskovic - http://www.nic2012.com/
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2012 3:42pm

That is why I'm very confused.
January 28th, 2012 3:53pm

Running Get-Exchangeserver will show you the version of Exchange you have installed.Martina Miskovic - http://www.nic2012.com/
Free Windows Admin Tool Kit Click here and download it now
January 28th, 2012 3:54pm

Haha you are right. Thanks for the link. Once I get this installed I will work on getting this backup thing going and see how it runs.
January 28th, 2012 4:14pm

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics