Files
Win11Debloat/Scripts/CLI/Wait-ForKeyPress.ps1

12 lines
259 B
PowerShell

function Wait-ForKeyPress {
# 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
}