13,005
回編集
(→方法 2) |
(→方法 2) |
||
48行目: | 48行目: | ||
#: <code>Start-Service sshd</code> | #: <code>Start-Service sshd</code> | ||
#: <br> | #: <br> | ||
#: | #: sshdサービスを自動起動する | ||
#: <code>Set-Service -Name sshd -StartupType 'Automatic'</code> | #: <code>Set-Service -Name sshd -StartupType 'Automatic'</code> | ||
#: <br> | #: <br> | ||
# ファイアウォールルールを設定する。 | # ファイアウォールルールを設定する。 | ||
<syntaxhighlight lang="powershell"> | |||
if (!(Get-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -ErrorAction SilentlyContinue | Select-Object Name, Enabled)) | if (!(Get-NetFirewallRule -Name "OpenSSH-Server-In-TCP" -ErrorAction SilentlyContinue | Select-Object Name, Enabled)) | ||
{ | { |