View autodl.ps1
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
# PRE REQS: | |
# Install-Module -Name ThreadJob | |
# Set-ExecutionPolicy RemoteSigned | |
$currentPrincipal = New-Object Security.Principal.WindowsPrincipal([Security.Principal.WindowsIdentity]::GetCurrent()) | |
if (!$currentPrincipal.IsInRole([Security.Principal.WindowsBuiltInRole]::Administrator)) { | |
Write-Host "Execute me in an elevated shell!" | |
Exit | |
} |
View autoexec.cfg
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
//~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~--~~-- | |
// | |
// ____ ____ ____ ____ _ ____ | |
// / ___)(_ _)( __)( __)(// ___) | |
// \___ \ )( ) _) ) _) \___ \ | |
// (____/ (__) (____)(__) (____/ | |
// _ | |
// ___ _ _| |_ ___ ___ _ _ ___ ___ | |
//| .'| | | _| . | -_|_'_| -_| _| | |
//|__,|___|_| |___|___|_,_|___|___| |
View win-to-win-ssh_copy_id.ps1
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
# SSH copy-id is not existent in win32 openssh (https://github.com/PowerShell/Win32-OpenSSH) | |
# So we need to do it ourselves. | |
# literally all I could find on Google was Windows to Unix: | |
# - https://www.chrisjhart.com/Windows-10-ssh-copy-id/ | |
# - https://stackoverflow.com/a/9971617/10503012 ('cat source | ssh user@host "cat >> /path/to/target"' --> the 'cat >> ' part does not work on Windows, the variable is not properly piped through | |
# I do not have enough experience on (Windows) piping to fix this in a proper way. | |
# Special shoutout to useless Stack answers: | |
# - https://stackoverflow.com/questions/65656813/copying-ssh-key-from-windows-machine-to-windows-server-2019 | |
# - https://stackoverflow.com/a/67541732/10503012 |