Export (0) Print
Expand All

Move-MsmqMessage

Move-MsmqMessage

This cmdlet can be used to move Messages between subqueues of the same queue or between the main queue and one of its subqueues.

Syntax

Parameter Set: Transactional
Move-MsmqMessage -DestinationQueue <MessageQueue> -InputObject <MessageQueue> -Message <Message> [-Transactional] [ <CommonParameters>]




Detailed Description

This cmdlet can be used to move Messages between subqueues of the same queue or between the main queue and one of its subqueues. The cmdlet returns a Message object representing the message that was moved. Subqueues are created implicitly on move or open operations. A user retrieves subqueues using the Get-MsmqQueue cmdlet.

Parameters

-DestinationQueue<MessageQueue>

An MsmqQueue object that represents the destination queue to which the message will be moved. The destination queue can be a subqueue or the main queue.


Aliases

none

Required?

true

Position?

named

Default Value

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-InputObject<MessageQueue>

An MsmqQueue object that represents the source queue from which the message will be moved. The source queue can be a subqueue or the main queue. Accepts pipelined input.


Aliases

none

Required?

true

Position?

named

Default Value

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Message<Message>

A Message object representing the message to be moved.


Aliases

none

Required?

true

Position?

named

Default Value

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Transactional

If specified, the message will be moved within a transaction context.


Aliases

none

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters

Examples

Usage Scenario

PS C:\> $srcQueue = Get-MSMQQueue –Private –Name “Myqueue” 
$dstQueue = Get-MSMQQueue –Private –Name “Myqueue” –SubQueue “MySubqueue”
$Message = $srcQueue | Receive-MSMQQueue -Peek
$srcQueue | Move-MSMQMessage –DestinationQueue $dstQueue –Message $Message

 

 

 



Was this page helpful?
(1500 characters remaining)
Thank you for your feedback
Show:
© 2014 Microsoft