Export Message from Queue

Hi,

I am using Exchange server 2013.

I know before we export a message we have to suspend it.

When I suspend the message using the command below, it goes into "Pending Suspend" state.

Get-Message -Identity "HT04\7\98384060" | Suspend-Message

Now, when I run Export-message, it gives me below error:

Export-Message -Identity "HT04\7\98384060" | AssembleMessage -Path "C:\users\raghu\Desktop\ram.eml"

The requested operation can't be performed for the object with identity HT04\7\98384060.
    + CategoryInfo          : InvalidOperation: (:) [Export-Message], LocalizedException
    + FullyQualifiedErrorId : [Server=MBX02,RequestId=f802426a-3ea3-4207-a38f-1956fe2b2290,TimeStamp=6/10/2015 7:11:57 PM] [FailureCategor
   y=Cmdlet-LocalizedException] 82919335,Microsoft.Exchange.Management.QueueViewerTasks.ExportMessage
    + PSComputerName        : CAS01.test.com

Am I doing something wrong here ?

Can some body advice me the correct steps to export a specific message from Active Queue ?

June 10th, 2015 3:38pm

Hi,

Please try to use the following command to export all message from a specific queue.

Get-Message -Queue HT04\7\98384060 | ForEach-Object {$Temp=" C:\users\raghu\Desktop\"+$_.InternetMessageID+".eml";$Temp=$Temp.Replace("<","_");$Temp=$Temp.Replace(">","_");Export-Message $_.Identity | AssembleMessage -Path $Temp}

Refer from:

https://technet.microsoft.com/en-us/library/aa998625%28v=exchg.150%29.aspx?f=255&MSPPError=-2147217396

Best Regards.

Free Windows Admin Tool Kit Click here and download it now
June 10th, 2015 11:01pm

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

Other recent topics Other recent topics