Add clear-recycle-bin.ps1

This commit is contained in:
Markus Fleschutz
2021-05-02 11:21:43 +02:00
parent bc7ed352fa
commit f12b44fb48
3 changed files with 16 additions and 0 deletions

14
Scripts/clear-recycle-bin.ps1 Executable file
View File

@ -0,0 +1,14 @@
<#
.SYNTAX clear-recycle-bin.ps1
.DESCRIPTION removes the content of the recycle bin folder (can not be undo!)
.LINK https://github.com/fleschutz/PowerShell
.NOTES Author: Markus Fleschutz / License: CC0
#>
try {
Clear-RecycleBin -Confirm:$false
exit 0
} catch {
write-error "ERROR: line $($_.InvocationInfo.ScriptLineNumber): $($Error[0])"
exit 1
}