This file contains 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
# Useful references: | |
# | |
# https://superuser.com/questions/992511/emulate-a-keyboard-button-via-the-command-line | |
# https://ss64.com/vb/sendkeys.html | |
# https://social.technet.microsoft.com/Forums/windowsserver/en-US/96b339e2-e9da-4802-a66d-be619aeb21ac/execute-function-one-time-in-every-10-mins-in-windows-powershell?forum=winserverpowershell | |
# https://learn-powershell.net/2013/02/08/powershell-and-events-object-events/ | |
# | |
# Removed the while loop. The script will be invoked by Task Scheduler either on schedule or basedon the event "4802" from "Security-Auditing" | |
$wsh = New-Object -ComObject WScript.Shell | |
$wsh.SendKeys('+{F15}') |
This file contains 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
# | |
# | |
##************************************* INFO SECTION ******************************* | |
# | |
# | |
# This script tests the current battery status and uses that information to : | |
# a) AT HOME: Turn the smart Plug on/off | |
# b) AWAY: Alert the user | |
# See all available battery info using Get-wmiobject win32_battery |Format-List * | |
# win32_battery documentation here: https://docs.microsoft.com/en-us/windows/desktop/cimwin32prov/win32-battery |
This file contains 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
reg delete "HKEY_USERS\.DEFAULT\Keyboard Layout\Preload" /f | |
#This and other solutions here: | |
#https://superuser.com/questions/1092246/how-to-prevent-windows-10-from-automatically-adding-keyboard-layouts-i-e-us-ke |
This file contains 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 elevate {Start-Process PowerShell -Verb RunAs} | |
Function q{exit} | |
This file contains 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
#Helper script from GitHub | |
# source: https://github.com/wwalker/ssh-find-agent | |
# (blog: http://blog.joncairns.com/2013/12/understanding-ssh-agent-and-ssh-add/) | |
#- Used in the 'Actions' section | |
. ~/scripts/ssh-find-agent.sh | |
## Setup outbound SSH. Run ssh agent and add keys | |
# This is only needed if agent is not running (e.g. after a reboot) | |
sshout () { |