From 84297d0dc557bfb40da8fe13df1c28677cd67b18 Mon Sep 17 00:00:00 2001 From: H8to <16744267+H8to@users.noreply.github.com> Date: Thu, 26 Jul 2018 17:04:04 +0200 Subject: [PATCH] Disable screen turnoff This should fix the client machines from turning off and locking the screen. --- Vagrant/scripts/MakeWindows10GreatAgain.ps1 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/Vagrant/scripts/MakeWindows10GreatAgain.ps1 b/Vagrant/scripts/MakeWindows10GreatAgain.ps1 index 7d5bef4..40ff47c 100644 --- a/Vagrant/scripts/MakeWindows10GreatAgain.ps1 +++ b/Vagrant/scripts/MakeWindows10GreatAgain.ps1 @@ -21,3 +21,8 @@ $appname = "Microsoft Store" ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$_.Name -eq $appname}).Verbs() | ?{$_.Name.replace('&','') -match 'Unpin from taskbar'} | %{$_.DoIt(); $exec = $true} $appname = "Mail" ((New-Object -Com Shell.Application).NameSpace('shell:::{4234d49b-0245-4df3-b780-3893943456e1}').Items() | ?{$_.Name -eq $appname}).Verbs() | ?{$_.Name.replace('&','') -match 'Unpin from taskbar'} | %{$_.DoIt(); $exec = $true} + +Write-Host "Disabling automatic screen turnoff in order to prevent screen locking..." +powercfg -change -monitor-timeout-ac 0 +powercfg -change -standby-timeout-ac 0 +powercfg -change -hibernate-timeout-ac 0