Table of contents
TLS
TOC
Collapse the table of content
Expand the table of content

New-MsmqMessage

Brian Lich|Last Updated: 3/8/2017

SYNOPSIS

Creates a message object.

SYNTAX

New-MsmqMessage [[-Body] <Object>] [-Recoverable] [-Authenticated] [-Journaling] [-Label <String>]
 [-AdminQueuePath <String>] [-AcknowledgeType <AcknowledgeTypes>] [-ResponseQueuePath <String>]
 [-TimeToReachQueue <TimeSpan>] [-TimeToBeReceived <TimeSpan>] [<CommonParameters>]

DESCRIPTION

The New-MsmqMessage cmdlet creates a System.Messaging.Message object that includes properties specified by parameters.

EXAMPLES

Example 1: Create a test message

PS C:\> New-MsmqMessage -Body "Test Message" -AdminQueuePath ".\private$\adminqueue" -Recoverable

This command creates a test message. The command specifies the queue that receives the acknowledgement message.

PARAMETERS

-AcknowledgeType

{{Fill AcknowledgeType Description}}

Type: AcknowledgeTypes
Parameter Sets: (All)
Aliases: 
Accepted values: None, PositiveArrival, PositiveReceive, NotAcknowledgeReachQueue, FullReachQueue, NegativeReceive, NotAcknowledgeReceive, FullReceive

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-AdminQueuePath

Specifies a path. The queue that the path specifies receives the acknowledgement messages that Message Queuing generates.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Authenticated

Indicates that the cmdlet sends the message as an authenticated message.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Body

Specifies the body of the message. The default value is an empty body.

Type: Object
Parameter Sets: (All)
Aliases: 

Required: False
Position: 0
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-Journaling

Indicates that the originating computer keeps a copy of the message in a journal.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Label

Specifies a label. The label that this parameter specifies describes the message. The default value is an empty string.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Recoverable

Indicates that the cmdlet sets the recoverable property of a message object.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-ResponseQueuePath

Specifies a path. The queue that this parameter specifies receives application-generated response messages.

Type: String
Parameter Sets: (All)
Aliases: 

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TimeToBeReceived

Specifies the maximum amount of time, in milliseconds, for the message to be received from the destination queue. The default value is 49.17:02:47.295.

Type: TimeSpan
Parameter Sets: (All)
Aliases: TTBR

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-TimeToReachQueue

Specifies the maximum amount of time, in milliseconds, for the message to reach the queue. The default value is 49.17:02:47.295.

Type: TimeSpan
Parameter Sets: (All)
Aliases: TTRQ

Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

CommonParameters

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

INPUTS

OUTPUTS

NOTES

Move-MsmqMessage

© 2017 Microsoft