Forum Discussion

Jason Hopp's avatar
Jason Hopp
Brass Contributor
Apr 05, 2017
Solved

Problem with PST Import request commands

My PST import jobs have stalled.  I was looking to remove the import jobs, but I am unable to because the Remove-MailboxImportRequest can not find them.  I can see them if I do a Get-MailboxImportRequest, but there are several parameters not available for the Remove-MailboxImportRequest that TechNet says should be there (-RequestGuid, -RequestQueue).

 

I can see the parameters on my on-premise exchange server, but when connecting to Exchange Online, those parameters are not available.

 

The Windows Powershell and Azure AD Module for Windows Powershell are both at 4.0.  The on-premise Exchange Shell is 4.0.

 

Is there a module I am not pulling, or something?  I am using the following to connect:

 

New-PSSession -ConfigurationName Microsoft.Exchange -ConnectionUri https://outlook.office365.com/powershell-liveid/ -Credential $UserCredential -Authentication Basic -AllowRedirection

 

Any help with this would be greatly appreciated.  It gets frustrating when MS says to use these parameters and they are not available.  We are going to try and remote-session from exchange shell on premise to Exchange online.  Will update when after that.

 

Jason.

  • I have found the issue.  The TechNet articles conserning the Remove, Set, and Suspend-MailboxImportRequest commands are incorrect when regarding Exchange Online, maybe not for on-premise servers though.

     

    The parameter of Identity is said to need the <alias>\<name>.  Those do not work for the Identity.  You have to drill down into the -- Get-MailboxImportRequest <mailbox> | fl -- in order to get the RequestGuid for each PST that is uploading.  Once you have the RequestGuid, use it with the Identity parameter for the Remove, Set or Suspend, and the you are able to do what you need.  (The RequestGuid is also needed for the Get-MailboxImportRequestStatistics command's Identity parameter.)  The -RequestGuid and -RequestQueue parameters are not available in Exchange Online.

     

    In my case, I want to remove the completed requests, so the command I used that works is the following:  Get-MailboxImportRequest -Status Completed | % {Remove-MailboxImportRequest $_.RequestGuid}

     

    The other commands will work this way as well.

     

    Again, on-premise for Exchange 2013 the TechNet article works as stated.  I would assume for 2016 as well.  But connecting to Exchange Online, it is not correct.  Just remember to get the RequestGuid and use it for the Identity on the other commands.

     

    Jason.

  • Jason Hopp's avatar
    Jason Hopp
    Brass Contributor

    I have found the issue.  The TechNet articles conserning the Remove, Set, and Suspend-MailboxImportRequest commands are incorrect when regarding Exchange Online, maybe not for on-premise servers though.

     

    The parameter of Identity is said to need the <alias>\<name>.  Those do not work for the Identity.  You have to drill down into the -- Get-MailboxImportRequest <mailbox> | fl -- in order to get the RequestGuid for each PST that is uploading.  Once you have the RequestGuid, use it with the Identity parameter for the Remove, Set or Suspend, and the you are able to do what you need.  (The RequestGuid is also needed for the Get-MailboxImportRequestStatistics command's Identity parameter.)  The -RequestGuid and -RequestQueue parameters are not available in Exchange Online.

     

    In my case, I want to remove the completed requests, so the command I used that works is the following:  Get-MailboxImportRequest -Status Completed | % {Remove-MailboxImportRequest $_.RequestGuid}

     

    The other commands will work this way as well.

     

    Again, on-premise for Exchange 2013 the TechNet article works as stated.  I would assume for 2016 as well.  But connecting to Exchange Online, it is not correct.  Just remember to get the RequestGuid and use it for the Identity on the other commands.

     

    Jason.

Resources