Exchange
--
Questions
--
Followers
Top Experts
Export Mailbox Exchange 2010 SP1 New-MailboxExportRequest
I am changing a vb script since the behavior of exporting mailboxes changed since SP1
But when i try the 'new' command i cant get it working.
We use Exchange 2010 build: 14.01.0289.007
When i use the following 'new' command in a exchange powershell window:
Before installing the latest rollup it worked perfectly.
Who can help me on the right way?
For reference purposes, this was the original script (that worked fine until sp1)
But when i try the 'new' command i cant get it working.
We use Exchange 2010 build: 14.01.0289.007
When i use the following 'new' command in a exchange powershell window:
New-MailboxExportRequest -filepath \\server -Mailbox nameofmailbox
i get the following error:Couldn't locate a database suitable for storing this request.
+ CategoryInfo : InvalidArgument: (nameofmailbox:MailboxOrMailUserIdParameter) [New-MailboxExportRequest], Ma
ilboxDatabase...manentException
+ FullyQualifiedErrorId : 91EA8D02,Microsoft.Exchange.Management.RecipientTasks.NewMailboxExportRequest
Before installing the latest rollup it worked perfectly.
Who can help me on the right way?
For reference purposes, this was the original script (that worked fine until sp1)
Echo off
:input
set ADUSERACCOUNT=
set /P ADUSERACCOUNT=AD Username voornaam.achternaam: %=%
if "%ADUSERACCOUNT%"=="" goto input
md c:\uitdienst\%ADUSERACCOUNT%
md c:\uitdienst\%ADUSERACCOUNT%\mail
md c:\uitdienst\%ADUSERACCOUNT%\profile
md c:\uitdienst\%ADUSERACCOUNT%\profile.V2
md c:\uitdienst\%ADUSERACCOUNT%\TSprofile
md c:\uitdienst\%ADUSERACCOUNT%\TSprofile.V2
md c:\uitdienst\%ADUSERACCOUNT%\data
xcopy \\filer\Personal\%ADUSERACCOUNT% c:\uitdienst\%ADUSERACCOUNT%\data\ /e /c /h
xcopy \\filer\shared\Profiles\%ADUSERACCOUNT% c:\uitdienst\%ADUSERACCOUNT%\profile\ /e /c /h
xcopy \\filer\shared\Profiles\%ADUSERACCOUNT%.V2 c:\uitdienst\%ADUSERACCOUNT%\profile.V2\ /e /c /h
xcopy \\filer\Profiles\%ADUSERACCOUNT%TS c:\uitdienst\%ADUSERACCOUNT%\TSprofile\ /e /c /h
xcopy \\filer\shared\Profiles\%ADUSERACCOUNT%TS.V2 c:\uitdienst\%ADUSERACCOUNT%\TSprofile.V2\ /e /c /h
Echo #Druk op F9 om de gekozen mailbox te exporteren naar de beheer mailbox. Vanaf daar kan er een .pst worden gemaakt. > exportmailbox.ps1
Echo #De export kan even duren... Geduld A.u.b. Als de export voltooid is kan je PowerGUI afsluiten >> exportmailbox.ps1
Echo Add-mailboxpermission -identity %ADUSERACCOUNT% -accessrights fullaccess -user beheerder >> exportmailbox.ps1
START "PowerShell" /WAIT C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command ". 'C:\Program Files\Microsoft\Exchange Server\V14\bin\RemoteExchange.ps1'; Connect-ExchangeServer -auto; . 'C:\uitdienst\Beheer\exportmailbox.ps1'; exit"
Echo #Druk op F9 om de gekozen mailbox te exporteren naar de beheer mailbox. Vanaf daar kan er een .pst worden gemaakt. > exportmailbox.ps1
Echo #De export kan even duren... Geduld A.u.b. Als de export voltooid is kan je PowerGUI afsluiten >> exportmailbox.ps1
Echo #Export-Mailbox -Identity %ADUSERACCOUNT% -TargetMailbox ka-beheer -TargetFolder Uitdienst\%ADUSERACCOUNT% >> exportmailbox.ps1
Echo Add-PSSnapin Microsoft.Exchange.Management.PowerShell.E2010 > exportmailbox.ps1
Echo Export-Mailbox -Identity %ADUSERACCOUNT% -PSTFolderPath C:\uitdienst\%ADUSERACCOUNT%.pst >> exportmailbox.ps1
START "PowerShell" /WAIT C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe -noexit -command ". 'C:\uitdienst\Beheer\exportmailbox.ps1'; exit"
xcopy c:\uitdienst\%ADUSERACCOUNT%.pst c:\uitdienst\%ADUSERACCOUNT%\mail\
del c:\uitdienst\%ADUSERACCOUNT%.pst
set AGAIN=
set /P AGAIN=Nogmaals voor andere gebruiker? (j/n) Enter voor Nogmaals. N voor stoppen
if "%AGAIN%"=="j" goto input
if "%AGAIN%"=="" goto input
Zero AI Policy
We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.
try below command:
Â
Â
$results = get-mailbox "John Doe"
$ShortName= $results.displayname -replace(" ","_") -replace("@","") -replace
(",","")
Export-Mailbox -Identity $results.displayname -PSTFolderPath c:\$ShortName-live.PST -BadItemLimit 600
Thank you for your suggestion, but Export-Mailbox is a not existing cmdlet anymore since the latest rollup as far as i know.
Anyone?






EARN REWARDS FOR ASKING, ANSWERING, AND MORE.
Earn free swag for participating on the platform.
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Exchange
--
Questions
--
Followers
Top Experts
Exchange is the server side of a collaborative application product that is part of the Microsoft Server infrastructure. Exchange's major features include email, calendaring, contacts and tasks, support for mobile and web-based access to information, and support for data storage.