# Set PC name to serial number
$pcname = (Get-WmiObject -Class Win32_BIOS).SerialNumber
Rename-Computer -NewName $pcname

#Set time to EST
net start w32time
w32tm /resync /rediscover
Set-Timezone -Id "Eastern Standard Time"

#Power and sleep settings to never
powercfg -change -monitor-timeout-dc 0
powercfg -change -monitor-timeout-ac 0
powercfg -change -standby-timeout-dc 0
powercfg -change -standby-timeout-ac 0

#Not dimmed UAC
reg add "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System" /v "PromptOnSecureDesktop" /t REG_DWORD /d "0" /f

#Turn on clipboard history
reg add "HKCU\Software\Microsoft\Clipboard" /v "EnableClipboardHistory" /t REG_DWORD /d "1" /f

#Set the screensaver timeout to 15 minutes (900 seconds)
$timeoutSeconds = 900
$command = "reg add ""HKCU\Control Panel\Desktop"" /v ScreenSaveTimeOut /t REG_SZ /d $timeoutSeconds /f"
Invoke-Expression $command

#Enable the screensaver and require a password to unlock
$requirePassword = "1"
$command = "reg add ""HKCU\Control Panel\Desktop"" /v ScreenSaverIsSecure /t REG_SZ /d $requirePassword /f"
Invoke-Expression $command