Skip to content

Instantly share code, notes, and snippets.

@pldmgg
Last active September 11, 2024 11:20
Show Gist options
  • Save pldmgg/20f4a257ab86f79866ac7f40276f91b0 to your computer and use it in GitHub Desktop.
Save pldmgg/20f4a257ab86f79866ac7f40276f91b0 to your computer and use it in GitHub Desktop.
WindowsSSHAccess
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