Export (0) Print
Expand All

Send-MsmqQueue

Send-MsmqQueue

Sends a test message to the specified queues.

Syntax

Parameter Set: Default
Send-MsmqQueue [[-Name] <String> ] [-AdminQueuePath <String> ] [-Authenticated] [-Body <Object> ] [-InputObject <MessageQueue[]> ] [-Journaling] [-Label <String> ] [-MessageObject <Message> ] [-Recoverable] [-ResponseQueuePath <String> ] [-TimeToBeReceived <TimeSpan> ] [-TimeToReachQueue <TimeSpan> ] [-Transactional] [ <CommonParameters>]




Detailed Description

The Send-MsmqQueue cmdlet sends a test message to one or more remote queues. Note that the Name parameter accepts path names, format names and direct format names, unlike other MSMQ cmdlets that accept only a friendly name for the queue. The cmdlet sends express messages by default. It returns a System.Messaging.Message object that represents the message sent.

Parameters

-AdminQueuePath<String>

Sets the pathname of the queue that receives the acknowledgement messages that Message Queuing generates. Default is empty string.


Aliases

none

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Authenticated

If specified, the message is sent as an authenticated message.


Aliases

none

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Body<Object>

The body of the message to be sent to the queue.


Aliases

none

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-InputObject<MessageQueue[]>

An array of MessageQueue objects that represent the destination queues to which the message will be sent. Accepts pipelined input.


Aliases

none

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

true (ByValue)

Accept Wildcard Characters?

false

-Journaling

If specified, indicates whether a copy of the message should be kept in a machine journal on the originating computer.


Aliases

none

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Label<String>

A label that describes the message. Default is empty string.


Aliases

none

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-MessageObject<Message>

A pre-constructed message object can be passed in as pipelined input.


Aliases

none

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String>

Aliases

none

Required?

false

Position?

1

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Recoverable

If specified, the message is sent as a recoverable message.


Aliases

none

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-ResponseQueuePath<String>

Sets the pathname of the queue that receives application-generated response messages. Default is empty string.


Aliases

none

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TimeToBeReceived<TimeSpan>

Sets the maximum amount of time for the message to be received from the destination queue. Default is 49.17:02:47.295. Alias: TTBR


Aliases

none

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-TimeToReachQueue<TimeSpan>

Sets the maximum amount of time for the message to reach the queue. Default is 49.17:02:47.295. Alias: TTRQ


Aliases

none

Required?

false

Position?

named

Default Value

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Transactional

If specified, the message is sent as a transactional message. Alias: Xact


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:\> Get-MsmqQueue –Name “a04bm10\private$\order_queue” | Send-MsmqQueue –Recoverable  –Transactional  –AdminQueuePath “.\private$\admin_queue”
Get-MsmqQueue –Name “FormatName:DIRECT=TCP:10.199.37.61\order_queue” | Send-MsmqQueue –Transactional –Label “From PowerShell

 

 

 



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