Skip to content

Instantly share code, notes, and snippets.

@srpomeroy
Created December 21, 2017 19:19
Show Gist options
  • Save srpomeroy/fcb82dc197fe80290b640d3ca4c5eed7 to your computer and use it in GitHub Desktop.
Save srpomeroy/fcb82dc197fe80290b640d3ca4c5eed7 to your computer and use it in GitHub Desktop.
Remove default OS timeout in Windows
$bcdConfig = & bcdedit.exe /enum
foreach($line in $bcdConfig) {
if ($line -like "timeout*") {
$timeout = $line.replace('timeout','').replace(' ','')
if($timeout -ne 0) {
Write-Output "Changing timeout from $timeout to 0"
& bcdedit.exe /timeout 0
BREAK
}
else {
Write-Output "Current timeout is already 0. Nothing to do."
BREAK
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment