Last active
September 11, 2024 11:20
-
-
Save pldmgg/20f4a257ab86f79866ac7f40276f91b0 to your computer and use it in GitHub Desktop.
WindowsSSHAccess
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
Set-ExecutionPolicy -ExecutionPolicy Unrestricted -Force | |
$newUsername = "ttadmin" | |
$newPwd = ConvertTo-SecureString "mypwd" -AsPlainText -Force | |
New-LocalUser -Name $newUsername -Password $newPwd | |
Add-LocalGroupMember -Group "Administrators" -Member $newUsername | |
Set-ExecutionPolicy Bypass -Scope Process -Force | |
[System.Net.ServicePointManager]::SecurityProtocol = [System.Net.ServicePointManager]::SecurityProtocol -bor 3072 | |
iex ((New-Object System.Net.WebClient).DownloadString('https://raw.githubusercontent.com/pldmgg/misc-powershell/master/MyScripts/Install-SSHD.ps1')) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment