mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-01-28 16:48:39 +01:00
Update clear-recycle-bin.ps1
This commit is contained in:
parent
9a0c57139c
commit
1d228e8fb5
@ -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))"
|
||||
|
Loading…
Reference in New Issue
Block a user