Table of contents
TLS
TOC
Collapse the table of content
Expand the table of content

Remove-MsmqQueue

Brian Lich|Last Updated: 3/8/2017

SYNOPSIS

Deletes queues.

SYNTAX

Remove-MsmqQueue -InputObject <MessageQueue[]> [-WhatIf] [-Confirm] [<CommonParameters>]

DESCRIPTION

The Remove-MsmqQueue cmdlet deletes queues. Specify queues to delete by using MsmqQueue objects. This cmdlet does not return anything.

EXAMPLES

Example 1: Remove public queues that have specified names

PS C:\> Get-MsmqQueue -Name "Order*" -QueueType Public | Remove-MsmqQueue

This command gets public queues that have names that start with the string Order by using the Get-MsmqQueue cmdlet. The command passes the results to the current cmdlet by using the pipeline operator. The current cmdlet removes the queues.

PARAMETERS

-Confirm

Prompts you for confirmation before running the cmdlet.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf

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

-InputObject

Specifies an array of MsmqQueue objects. This cmdlet deletes the queues that the MsmqQueue objects specify. This parameter accepts pipeline input.

Type: MessageQueue[]
Parameter Sets: (All)
Aliases: 

Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi

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

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

OUTPUTS

NOTES

Clear-MsmqQueue

Get-MsmqQueue

New-MsmqQueue

Receive-MsmqQueue

Send-MsmqQueue

Set-MsmqQueue

© 2017 Microsoft