Skip to content

Instantly share code, notes, and snippets.

@fa0311
Last active April 30, 2024 09:56
Show Gist options
  • Save fa0311/8abe6f3d856354448a6caf13fa5118b9 to your computer and use it in GitHub Desktop.
Save fa0311/8abe6f3d856354448a6caf13fa5118b9 to your computer and use it in GitHub Desktop.
Windows を SSH サーバーにするTips
if (!([Security.Principal.WindowsPrincipal][Security.Principal.WindowsIdentity]::GetCurrent()).IsInRole("Administrators")) { Start-Process powershell.exe "-File `"$PSCommandPath`"" -Verb RunAs; exit }
Start-Service sshd
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment