Test-MsmqMessageQueue

Tests if an MSMQ message queue exists.

Syntax

Test-MsmqMessageQueue [-Name] <String> [-Private] [<CommonParameters>]

Description

Returns True if a message queue with name Name exists. False otherwise.

Parameters

Name Type Description Required? Pipeline Input Default Value
Name String

The queue name.

true false
Private SwitchParameter

If the queue is private, this switch must be set.

false false False

Return Values

System.Boolean.

EXAMPLE 1

Test-MsmqMessageQueue -Name 'MovieQueue'

Returns True if public queue MovieQueue exists, False otherwise.

EXAMPLE 2

Test-MsmqMessageQueue -Name 'MovieCriticsQueue' -Private

Returns True if private queue MovieCriticsQueue exists, False otherwise.