description | external help file | Module Name | ms.date | online version | schema | title |
---|---|---|---|---|---|---|
Use this topic to help manage Windows and Windows Server technologies with Windows PowerShell. |
Microsoft.Msmq.PowerShell.Commands.dll-Help.xml |
MSMQ |
12/27/2016 |
2.0.0 |
Clear-MSMQOutgoingQueue |
Clears outgoing queues.
Clear-MsmqOutgoingQueue -InputObject <OutgoingQueue[]> [-WhatIf] [-Confirm] [<CommonParameters>]
The Clear-MsmqOutgoingQueue cmdlet clears outgoing queues. Specify queues to clear by using MsmqOutgoingQueue objects. This cmdlet returns an MsmqOutgoingQueue object that represents the cleared outgoing queue.
PS C:\> Get-MsmqOutgoingQueue -Name "Order*" | Clear-MsmqOutgoingQueue
This command gets all the outgoing message queues that have names that start with the string Order by using the Get-MsmqOutgoingQueue cmdlet. The command passes the results to the current cmdlet by using the pipeline operator. The current cmdlet clears each queue.
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specifies an array of MsmqOutgoingQueue objects. This cmdlet clears outgoing queues that this parameter specifies. This parameter accepts pipeline input.
Type: OutgoingQueue[]
Parameter Sets: (All)
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
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: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.