Get-MsmqMessageQueuePath

Gets the path to an MSMQ message queue.

Syntax

Get-MsmqMessageQueuePath [-Name] <String> [-Private] [-WhatIf] [-Confirm] [<CommonParameters>]

Description

The MSMQ APIs expect paths when identifying a queue. This function converts a queue name into its path so that logic isn't spread across all your scripts.

Private queue paths are constructed differently. If you need to get the path to a private MSMQ, use the Private switch.

Parameters

Name Type Description Required? Pipeline Input Default Value
Name String

The queue's name.

true false
Private SwitchParameter

Is the queue private?

false false False
WhatIf SwitchParameter false false
Confirm SwitchParameter false false
CommonParameters This cmdlet supports common parameters. For more information type
Get-Help about_CommonParameters.

Return Values

System.String.

EXAMPLE 1

Get-MsmqMessageQueuePath -Name MovieQueue

Returns the path to the MovieQueue queue.

EXAMPLE 2

Get-MsmqMessageQueuePath -Name MovieQueue -Private

Returns the path to the private MovieQueue. Must be for the critics. Early access for the win!