From 4bf383023bec1e05699360f779297b2f73d2d21d Mon Sep 17 00:00:00 2001 From: NiceDevil Date: Tue, 19 Dec 2023 09:50:51 +0000 Subject: [PATCH] Add Windows/WinRM.md --- Windows/WinRM.md | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 Windows/WinRM.md diff --git a/Windows/WinRM.md b/Windows/WinRM.md new file mode 100644 index 0000000..d38bff7 --- /dev/null +++ b/Windows/WinRM.md @@ -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 +``` \ No newline at end of file