mirror of
https://github.com/fleschutz/PowerShell.git
synced 2025-02-02 10:59:14 +01:00
Improve clear-recycle-bin.ps1
This commit is contained in:
parent
90a7f3dda1
commit
964352f83a
@ -1,4 +1,4 @@
|
||||
<#
|
||||
<#
|
||||
.SYNOPSIS
|
||||
clear-recycle-bin.ps1
|
||||
.DESCRIPTION
|
||||
@ -14,6 +14,8 @@
|
||||
|
||||
try {
|
||||
Clear-RecycleBin -Confirm:$false
|
||||
if ($lastExitCode -ne "0") { throw "'Clear-RecycleBin' failed" }
|
||||
|
||||
"✔️ cleared recycle bin"
|
||||
exit 0
|
||||
} catch {
|
||||
|
Loading…
Reference in New Issue
Block a user