The New-MsmqQueue cmdlet creates public or private queues.
The cmdlet returns System.Messaging.MessageQueue objects that represent the new queues.
If you do not specify QueueType parameter, the cmdlet creates a private queue.
Examples
Example 1: Create a public queue
PS C:\> New-MsmqQueue -Name "OrderQueue" -QueueType Public
This command creates a public queue named OrderStatus.
Example 2: Create a private queue for authenticated messages
This command creates a private queue named OrderQueue.
The queue accepts only authenticated messages.
The command specifies a quota size for the queue.
Parameters
-Authenticate
Indicates that the queue accepts only authenticated messages.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Journaling
Indicates that received messages are copied to the journal queue.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-JournalQuota
Specifies the maximum size of the journal queue.
Specify a value in kilobytes.
If you do not specify a value, this cmdlet uses the default journal queue quota.
Parameter properties
Type:
Int64
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Label
Specifies a label.
The label that this parameter specifies describes the queue.
The default value is an empty string.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-MulticastAddress
Specifies the multicast address associated with the queue.
If you do not specify a multicast address, the cmdlet does not assign a multicast address to this queue.
Parameter properties
Type:
String
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Name
Specifies an array of names of queues.
This parameter specifies friendly names of queues.
This parameter does not support wildcard characters.
Parameter properties
Type:
String[]
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
0
Mandatory:
True
Value from pipeline:
True
Value from pipeline by property name:
False
Value from remaining arguments:
False
-PrivacyLevel
Specifies the privacy level associated with the queue.
The default value is Optional.
Parameter properties
Type:
EncryptionRequired
Default value:
None
Accepted values:
None, Optional, Body
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-QueueQuota
Specifies the maximum size, in kilobytes, of the queue.
If you do not specify a value, this cmdlet uses the default queue quota.
Parameter properties
Type:
Int64
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-QueueType
Specifies a queue type.
The acceptable values for this parameter are:
Private.
The cmdlet creates a private queue with the name that the Name parameter specifies.
Public.
The cmdlet creates a public queue with the name that the Name parameter specifies.
The default value is Private.
Parameter properties
Type:
MSMQQueueType
Default value:
None
Accepted values:
Private, Public
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
-Transactional
Indicates that the cmdlet creates a transactional queue at the specified path.
Parameter properties
Type:
SwitchParameter
Default value:
None
Supports wildcards:
False
DontShow:
False
Parameter sets
(All)
Position:
Named
Mandatory:
False
Value from pipeline:
False
Value from pipeline by property name:
False
Value from remaining arguments:
False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters.