Update clear-recycle-bin.ps1

This commit is contained in:
Markus Fleschutz 2021-12-13 08:36:10 +01:00
parent 9a0c57139c
commit 1d228e8fb5

View File

@ -1,12 +1,11 @@
<#
.SYNOPSIS
Removes the content of the recycle bin folder permanently
Clears the recycle bin folder
.DESCRIPTION
This script removes the content of the recycle bin folder permanently.
NOTE: can not be undo!
NOTE: this cannot be undo!
.EXAMPLE
PS> ./clear-recycle-bin
cleared recycle bin
.NOTES
Author: Markus Fleschutz · License: CC0
.LINK
@ -17,7 +16,7 @@ try {
Clear-RecycleBin -Confirm:$false
if ($lastExitCode -ne "0") { throw "'Clear-RecycleBin' failed" }
"✔️ cleared recycle bin"
& "$PSScriptRoot/give-reply.ps1" "It's clean now."
exit 0 # success
} catch {
"⚠️ Error: $($Error[0]) ($($MyInvocation.MyCommand.Name):$($_.InvocationInfo.ScriptLineNumber))"