New-Msmq
Message
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.
Optional Parameters
{{Fill AcknowledgeType Description}}
Type: | AcknowledgeTypes |
Parameter Sets: | None, PositiveArrival, PositiveReceive, NotAcknowledgeReachQueue, FullReachQueue, NegativeReceive, NotAcknowledgeReceive, FullReceive |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies a path. The queue that the path specifies receives the acknowledgement messages that Message Queuing generates.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Indicates that the cmdlet sends the message as an authenticated message.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies the body of the message. The default value is an empty body.
Type: | Object |
Position: | 0 |
Default value: | None |
Accept pipeline input: | True (ByValue) |
Accept wildcard characters: | False |
Indicates that the originating computer keeps a copy of the message in a journal.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies a label. The label that this parameter specifies describes the message. The default value is an empty string.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Indicates that the cmdlet sets the recoverable property of a message object.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Specifies a path. The queue that this parameter specifies receives application-generated response messages.
Type: | String |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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 |
Aliases: | TTBR |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |
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 |
Aliases: | TTRQ |
Position: | Named |
Default value: | None |
Accept pipeline input: | False |
Accept wildcard characters: | False |