Skip to content

Instantly share code, notes, and snippets.

@rbm01
rbm01 / suspend-PC.ps1
Last active July 8, 2021 08:45 — forked from wendelb/logoff.ps1
Suspend your workstation after Idle-Timeout with PowerShell
#
# This background job automatically suspends your Workstation after a specified amount of
# time. It will come in handy if Windows sleep feature seems to go AWOL.
#
# start with
# powershell.exe -windowstyle hidden -executionpolicy Unrestricted P:\ATH\TO\logoff.ps1
#
# `-windowstyle hidden` will make your PowerShell disappear/run in background
# `-executionpolicy Unrestricted` will enable this PowerShell process to allow non-signed scripts
#
@rbm01
rbm01 / file1.txt
Created July 16, 2016 05:49
Created via API
Demo