Add Windows/WinRM.md

This commit is contained in:
2023-12-19 09:50:51 +00:00
parent 94db472856
commit 4bf383023b

16
Windows/WinRM.md Normal file
View File

@@ -0,0 +1,16 @@
# Enable WinRM on PC
Make sure your ethernet is connected to a non public network type.
Windows 11 => open Settings => Network & Internet => Ethernet => switch to Private Network
# Powershell commands (run as Administrator)
```powershell
Set-Service WinRM -StartupType Automatic -PassThru
Start-Service WinRM -PassThru
winrm quickconfig
Set-Item WSMan:\localhost\Client\TrustedHosts -Value '10.0.0.0'
$c=New-SelfSignedCertificate -DnsName "10.0.0.0" -CertStoreLocation cert:\LocalMachine\My
netsh advfirewall firewall add rule name="WinRM-HTTP" dir=in localport=5985 protocol=TCP action=allow
netsh advfirewall firewall add rule name="WinRM-HTTPS" dir=in localport=5986 protocol=TCP action=allow
```