Files
Win11Debloat/Scripts/CLI/AwaitKeyToExit.ps1

11 lines
256 B
PowerShell
Raw Normal View History

function AwaitKeyToExit {
# Suppress prompt if Silent parameter was passed
if (-not $Silent) {
Write-Output ""
Write-Output "Press any key to exit..."
$null = [System.Console]::ReadKey()
}
Stop-Transcript
Exit
}