Get-MsmqQueue

Gets message queues.

Syntax

Get-MsmqQueue
   [[-Name] <String[]>]
   [-QueueType <QueueType>]
   [<CommonParameters>]
Get-MsmqQueue
   [[-Name] <String[]>]
   [-QueueType <QueueType>]
   [-Journal]
   [<CommonParameters>]
Get-MsmqQueue
   [[-Name] <String[]>]
   [-QueueType <QueueType>]
   [-SubQueue <String>]
   [<CommonParameters>]

Description

The Get-MsmqQueue cmdlet gets an array of MsmqQueue objects. Each MsmqQueue object represents an existing private, public, or system queue. This cmdlet gets queues that are local to the computer where you run the cmdlet. If you do not specify parameters, this cmdlet gets all public, private, and system queues of the host computer.

Examples

Example 1

PS C:\> Get-MsmqQueue

Example 2

PS C:\>Get-MsmqQueue -Name "Order*" -QueueType Private

Example 3

PS C:\>Get-MsmqQueue -Name "Order*" -Journal -QueueType Private

Example 4

PS C:\>Get-MsmqQueue -QueueType SystemJournal

Parameters

-Journal

Indicates that this cmdlet retrieves the Journal queue or queues that match the Name parameter.

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

-Name

Specifies an array of names of queues. This cmdlet accepts wildcard characters. The default value is *.

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

-QueueType

Specifies a queue type. The acceptable values for this parameter are:

  • PrivateAndPublic. The cmdlet gets public and private queues that match the Name parameter.
  • Private. The cmdlet gets private queues that match the Name parameter.
  • Public. The cmdlet gets public queues that match the Name parameter.
  • SystemDeadLetter. The cmdlet gets non-transactional dead-letter queues that match the Name parameter.
  • SystemJournal. The cmdlet gets system journal queues that match the Name parameter.
  • SystemTransactionalDeadLetter. The cmdlet gets transactional dead-letter queues that match the Name parameter.

The default value is PrivateAndPublic.

Type:QueueType
Accepted values:PrivateAndPublic, Private, Public, SystemJournal, SystemDeadLetter, SystemTransactionalDeadLetter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SubQueue

Specifies a subqueue object to get for the main queue. If the subqueue does not exist, the cmdlet creates it implicitly. The question mark (?) and asterisk (*) are not interpreted as wildcard characters, but part of the subqueue name.

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