This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function Test-IsAdminElevated { | |
if (([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]:: | |
GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { | |
return $true | |
} else { | |
return $false | |
} | |
} | |
function Start-AdminElevatedTerminal { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
param ( | |
[switch]$libraryPaths | |
) | |
$STEAM_REG_PATHS = @( | |
'HKLM:\SOFTWARE\WOW6432Node\Valve\Steam', | |
'HKLM:\SOFTWARE\Valve\Steam' | |
) | |
$steamPath = $null |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<# | |
.SYNOPSIS | |
Monitors Steam downloads and initiates a system shutdown when downloads have completed. | |
.DESCRIPTION | |
This script will check for active Steam downloads and monitor their progress. Other scripts rely on | |
network / disk activity however they are somewhat flawed as they don't accommodate for user intervention | |
or drop in network connectivity. | |
Providing Steam doesn't change how the registry settings work, this script should correctly identify when |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$strRegJson = @" | |
[ | |
{ | |
"RegPath": "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes", | |
"Name": "CurrentTheme", | |
"Type": "STRING", | |
"Value": "C:\\Windows\\resources\\Themes\\dark.theme" | |
}, | |
{ | |
"RegPath": "HKEY_CURRENT_USER\\Software\\Microsoft\\Windows\\CurrentVersion\\Themes\\HighContrast", |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Function Test-IsAdminElevated { | |
if (([Security.Principal.WindowsPrincipal] [Security.Principal.WindowsIdentity]:: | |
GetCurrent()).IsInRole([Security.Principal.WindowsBuiltInRole] "Administrator")) { | |
return $true | |
} | |
else { | |
return $false | |
} | |
} |