Remove-MsmqQueue
Deletes queues.
Syntax
Default (Default)
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.
Parameter properties
Type: | SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Aliases: | cf |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-InputObject
Specifies an array of MsmqQueue objects. This cmdlet deletes the queues that the MsmqQueue objects specify. This parameter accepts pipeline input.
Parameter properties
Type: | MessageQueue[] |
Default value: | None |
Supports wildcards: | False |
DontShow: | False |
Parameter sets
(All)
Position: | Named |
Mandatory: | True |
Value from pipeline: | True |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Parameter properties
Type: | SwitchParameter |
Default value: | False |
Supports wildcards: | False |
DontShow: | False |
Aliases: | wi |
Parameter sets
(All)
Position: | Named |
Mandatory: | False |
Value from pipeline: | False |
Value from pipeline by property name: | False |
Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.