May 7, 2012

'New-MailboxExportRequest' is not recognized as the name of a cmdlet, function, script file, or operable program

When attempting to export a mailbox to pst, if you are faced with an error in Powershell with

“The Term 'New-MailboxExportRequest' is not recognized as the name of a cmdlet, function, script file, or operable program” this indicates that you have not been provisioned with the role."

You need to run the New-ManagementRoleAssignment cmdlet to assign the role to be able to import and export

New-ManagementRoleAssignment –Role “Mailbox Import Export” –User <domain>\<username>

eg:
New-ManagementRoleAssignment –Role “Mailbox Import Export” –User mydomain\Tyger

1: Assign the permission

New-managementroleassignment –role “mailbox import export” –user <Domain>\<your adm account> 
(eg)
New-managementroleassignment –role “mailbox import export” –user mydomain\Tyger

 

2: Then you will be able to run the export cmdlet (save to local path in this cmdlet)
 

New-MailboxExportRequest <username> -Filepath \\<server>\location\<filename>.pst
(eg)
New-mailboxEportRequest jsmith -Filepath \\exchange1\pst_files\jsmith.pst



3: Follow the .pst export progress


Get-MailboxExportRequest | Get-MailboxExportRequestStatistics


4: When the export reaches 100%, you will need to remove the pst move request from the queue.

Get-MailboxExportRequest | Remove-MailboxExportRequest

If you are running multiple moves and would like to remove all the completed requests:

Get-MailboxExportRequest | ? {$_.status -eq 'complete'} | Remove-
MailboxExportRequest








No comments:

Post a Comment