Skip to content

Commit

Permalink
fixed sentence, copyedits (MicrosoftDocs#4475)
Browse files Browse the repository at this point in the history
  • Loading branch information
davidsmatlak authored and sdwheeler committed Jun 24, 2019
1 parent 25be9ed commit 522ea7e
Show file tree
Hide file tree
Showing 2 changed files with 90 additions and 57 deletions.
71 changes: 43 additions & 28 deletions reference/5.0/Microsoft.PowerShell.Management/Clear-RecycleBin.md
Original file line number Diff line number Diff line change
@@ -1,67 +1,81 @@
---
ms.date: 06/09/2017
ms.date: 6/24/2019
schema: 2.0.0
locale: en-us
keywords: powershell,cmdlet
online version: https://go.microsoft.com/fwlink/?linkid=821571
external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
title: Clear-RecycleBin
---

# Clear-RecycleBin

## SYNOPSIS
Clears the contents of a recycle bin.

## SYNTAX

### All

```
Clear-RecycleBin [[-DriveLetter] <String[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION

The Clear-RecycleBin cmdlet deletes the content of a recycle bin. Running this cmdlet is equivalent to the "Empty Recycle Bin" action.
The `Clear-RecycleBin` cmdlet deletes the content of a computer's recycle bin. This action is like
using Windows **Empty Recycle Bin**.

## EXAMPLES

### 1: Clear all recycle bins

In this example, all the local computer's recycle bins are cleared.

```powershell
Clear-RecycleBin
```
PS C:\> Clear-RecycleBin

```Output
Confirm
Are you sure you want to perform this action?
Performing the operation "Clear-RecycleBin" on target "All of the contents of the Recycle Bin".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):
```
This command will clear all recycle bins present on the local computer.
the command will prompt for user confirmation before execution.

### 2: Clear single recycle bin
`Clear-RecycleBin` prompts the user for confirmation to clear all recycle bins on the local
computer.

### 2: Clear a specified recycle bin

This example clears the recycle bin for a specified drive letter.

```powershell
Clear-RecycleBin -DriveLetter C
```
PS C:\> Clear-RecycleBin -DriveLetter C
```
This command will clear the recycle bin on the volume with the C drive letter.
This command will not work on
The command will prompt for user confirmation before execution.

`Clear-RecycleBin` uses the **DriveLetter** parameter to specify the recycle bin on the **C**
volume. The user is prompted for confirmation to run the command.

### 3: Clear all recycle bins without confirmation

This example doesn't prompt for confirmation to clear the local computer's recycle bins.

```powershell
Clear-RecycleBin -Force
```
PS C:\> Clear-RecycleBin -Force
```
This command will clear the recycle bin on the volume with the C drive letter.
The command will NOT prompt for user confirmation before execution.

### 3: Clear all recycle bins without confirmation (alternative)
`Clear-RecycleBin` uses the **Force** parameter and doesn't prompt the user for confirmation to
clear all recycle bins on the local computer.

```
PS C:\> Clear-RecycleBin -Confirm:$false
```
This command will clear the recycle bin on the volume with the C drive letter.
The command will NOT prompt for user confirmation before execution.
An alternative is to replace `-Force` with `-Confirm:$false`.

## PARAMETERS

### -Confirm

Prompts you for confirmation before running the cmdlet.
Prompts for user confirmation before running the cmdlet. The user is prompted for confirmation even
if the **Confirm** parameter isn't specified.

```yaml
Type: SwitchParameter
Expand All @@ -77,7 +91,7 @@ Accept wildcard characters: False
### -DriveLetter
Specifies an array of drive letters for which this cmdlet clears the recycle bin.
Specifies the recycle bin to clear for a single drive letter or an array of drive letters.
```yaml
Type: String[]
Expand All @@ -93,7 +107,7 @@ Accept wildcard characters: False
### -Force
Forces the command to run without asking for user confirmation.
Specifies that the user isn't prompted for confirmation to clear a recycle bin.
```yaml
Type: SwitchParameter
Expand All @@ -109,8 +123,7 @@ Accept wildcard characters: False
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Shows what would happen if `Clear-RecycleBin` runs. The cmdlet isn't run.

```yaml
Type: SwitchParameter
Expand All @@ -126,12 +139,14 @@ 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 (http://go.microsoft.com/fwlink/?LinkID=113216).
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

## OUTPUTS

## NOTES

## RELATED LINKS
## RELATED LINKS
76 changes: 47 additions & 29 deletions reference/5.1/Microsoft.PowerShell.Management/Clear-RecycleBin.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ external help file: Microsoft.PowerShell.Commands.Management.dll-Help.xml
keywords: powershell,cmdlet
locale: en-us
Module Name: Microsoft.PowerShell.Management
ms.date: 06/09/2017
ms.date: 6/24/2019
online version: https://go.microsoft.com/fwlink/?linkid=821571
schema: 2.0.0
title: Clear-RecycleBin
Expand All @@ -12,58 +12,70 @@ title: Clear-RecycleBin
# Clear-RecycleBin

## SYNOPSIS

Clears the contents of a recycle bin.

## SYNTAX

### All

```
Clear-RecycleBin [[-DriveLetter] <String[]>] [-Force] [-WhatIf] [-Confirm] [<CommonParameters>]
```

## DESCRIPTION

The Clear-RecycleBin cmdlet deletes the content of a recycle bin. Running this cmdlet is equivalent to the "Empty Recycle Bin" action.
The `Clear-RecycleBin` cmdlet deletes the content of a computer's recycle bin. This action is like
using Windows **Empty Recycle Bin**.

## EXAMPLES

### 1: Clear all recycle bins

In this example, all the local computer's recycle bins are cleared.

```powershell
Clear-RecycleBin
```
PS C:\> Clear-RecycleBin

```Output
Confirm
Are you sure you want to perform this action?
Performing the operation "Clear-RecycleBin" on target "All of the contents of the Recycle Bin".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"):
```

This command will clear all recycle bins present on the local computer.
the command will prompt for user confirmation before execution.
`Clear-RecycleBin` prompts the user for confirmation to clear all recycle bins on the local
computer.

### 2: Clear single recycle bin
```
PS C:\> Clear-RecycleBin -DriveLetter C
### 2: Clear a specified recycle bin

This example clears the recycle bin for a specified drive letter.

```powershell
Clear-RecycleBin -DriveLetter C
```

This command will clear the recycle bin on the volume with the C drive letter.
This command will not work on
The command will prompt for user confirmation before execution.
`Clear-RecycleBin` uses the **DriveLetter** parameter to specify the recycle bin on the **C**
volume. The user is prompted for confirmation to run the command.

### 3: Clear all recycle bins without confirmation
```
PS C:\> Clear-RecycleBin -Force
```

This command will clear the recycle bin on the volume with the C drive letter.
The command will NOT prompt for user confirmation before execution.
This example doesn't prompt for confirmation to clear the local computer's recycle bins.

### 3: Clear all recycle bins without confirmation (alternative)
```
PS C:\> Clear-RecycleBin -Confirm:$false
```powershell
Clear-RecycleBin -Force
```

This command will clear the recycle bin on the volume with the C drive letter.
The command will NOT prompt for user confirmation before execution.
`Clear-RecycleBin` uses the **Force** parameter and doesn't prompt the user for confirmation to
clear all recycle bins on the local computer.

An alternative is to replace `-Force` with `-Confirm:$false`.

## PARAMETERS

### -DriveLetter
Specifies an array of drive letters for which this cmdlet clears the recycle bin.

Specifies the recycle bin to clear for a single drive letter or an array of drive letters.

```yaml
Type: String[]
Expand All @@ -78,7 +90,8 @@ Accept wildcard characters: False
```
### -Force
Forces the command to run without asking for user confirmation.
Specifies that the user isn't prompted for confirmation to clear a recycle bin.
```yaml
Type: SwitchParameter
Expand All @@ -93,7 +106,9 @@ Accept wildcard characters: False
```
### -Confirm
Prompts you for confirmation before running the cmdlet.
Prompts for user confirmation before running the cmdlet. The user is prompted for confirmation even
if the **Confirm** parameter isn't specified.
```yaml
Type: SwitchParameter
Expand All @@ -108,8 +123,8 @@ Accept wildcard characters: False
```
### -WhatIf
Shows what would happen if the cmdlet runs.
The cmdlet is not run.
Shows what would happen if `Clear-RecycleBin` runs. The cmdlet isn't run.

```yaml
Type: SwitchParameter
Expand All @@ -124,12 +139,15 @@ 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 (http://go.microsoft.com/fwlink/?LinkID=113216).

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
-WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).

## INPUTS

## OUTPUTS

## NOTES

## RELATED LINKS
## RELATED LINKS

0 comments on commit 522ea7e

Please sign in to comment.