install
Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0
Start-Service sshd
Set-Service -Name sshd -StartupType 'Automatic'
Set-NetFirewallRule -Name 'OpenSSH-Server-In-TCP' -Profile Any
(Get-NetFirewallRule -Name 'OpenSSH-Server-In-TCP').Profile
| 想做的事 | 命令 |
|---|---|
| 立即重启 | shutdown /r /t 0 |
| 5 分钟后重启(可取消) | shutdown /r /t 300 |
| 取消计划的重启 | shutdown /a |
| 强制重启(不警告) | shutdown /r /f /t 0 |
| PowerShell 重启 | Restart-Computer -Force |
## use
whoami /groups | findstr "S-1-16"
Mandatory Label\High Mandatory Level 标签 S-1-16-12288