Condividi tramite


Get-MsmqQueue

Get-MsmqQueue

This cmdlet returns an array of MsmqQueue objects, each of them representing an existing private, public or system queue.

Syntax

Parameter Set: All
Get-MsmqQueue [[-Name] <String[]> ] [-QueueType <QueueType> {PrivateAndPublic | Private | Public | SystemJournal | SystemDeadLetter | SystemTransactionalDeadLetter} ] [ <CommonParameters>]

Parameter Set: Journal
Get-MsmqQueue [[-Name] <String[]> ] [-Journal] [-QueueType <QueueType> {PrivateAndPublic | Private | Public | SystemJournal | SystemDeadLetter | SystemTransactionalDeadLetter} ] [ <CommonParameters>]

Parameter Set: SubQueue
Get-MsmqQueue [[-Name] <String[]> ] [-QueueType <QueueType> {PrivateAndPublic | Private | Public | SystemJournal | SystemDeadLetter | SystemTransactionalDeadLetter} ] [-SubQueue <String> ] [ <CommonParameters>]

Detailed Description

This cmdlet returns an array of MsmqQueue objects, each of them representing an existing private, public or system queue. The queue must be local to the machine on which the cmdlet is executed. Without parameters this cmdlet will return all Public, Private and System Queues of the host machine.

Parameters

-Journal

If specified, retrieves the Journal queue(s) that match the Name parameter.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Name<String[]>

The name of a queue. Supports wildcard characters. The default is "*".

Aliases

none

Required?

false

Position?

1

Default Value

none

Accept Pipeline Input?

true(ByValue)

Accept Wildcard Characters?

false

-QueueType<QueueType>

If specified as PrivateAndPublic, returns all public and private queues that match the –Name parameter.If specified as Private, returns all private queues that match the –Name parameter.If specified as Public, returns all public queues that match the –Name parameter.If specified as SystemDeadLetter, returns all non-transactional dead letter queues that match the –Name parameter.If specified as SystemJournal, returns all system journal queues that match the –Name parameter.If specified as SystemTransactionalDeadLetter, returns all transactional dead letter queues that match the –Name parameter.Default is PrivateAndPublic.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-SubQueue<String>

If specified, returns the subqueue object for the main queue. If the subqueue doesn’t exist, then one will be created implicitly. The characters ‘?’ and ‘*’ are not interpreted as wildcard characters, but part of the subqueue name.

Aliases

none

Required?

false

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see    about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

Outputs

The output type is the type of the objects that the cmdlet emits.

Examples

Usage Example

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