New-MsmqQueue

Creates public or private queues.

Syntax

New-MsmqQueue
   [-Name] <String[]>
   [-QueueType <MSMQQueueType>]
   [-Transactional]
   [-Label <String>]
   [-Authenticate]
   [-Journaling]
   [-QueueQuota <Int64>]
   [-JournalQuota <Int64>]
   [-PrivacyLevel <EncryptionRequired>]
   [-MulticastAddress <String>]
   [<CommonParameters>]

Description

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

PS C:\> New-MsmqQueue -Name "OrderQueue" -Authenticate -MulticastAddress "234.12.3:8001" -QueueQuota 200000

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.

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

-Journaling

Indicates that received messages are copied to the journal queue.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

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

-Label

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

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

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

-Name

Specifies an array of names of queues. This parameter specifies friendly names of queues. This parameter does not support wildcard characters.

Type:String[]
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-PrivacyLevel

Specifies the privacy level associated with the queue. The default value is Optional.

Type:EncryptionRequired
Accepted values:None, Optional, Body
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:Int64
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:MSMQQueueType
Accepted values:Private, Public
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Transactional

Indicates that the cmdlet creates a transactional queue at the specified path.

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

Inputs

String[]

Outputs

Object