Last active
December 5, 2025 09:27
-
-
Save Larswa/4b901b6da6bedc73f336d302fb76a7dd to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # WinRM | |
| Enable-PSRemoting -Force | |
| Set-Item WSMan:\localhost\Service\Auth\Basic -Value $true | |
| Set-Item WSMan:\localhost\Service\AllowUnencrypted -Value $true | |
| New-NetFirewallRule -Name "WinRM-HTTP" -DisplayName "WinRM HTTP" -Protocol TCP -LocalPort 5985 -Action Allow | |
| # SSH | |
| Add-WindowsCapability -Online -Name OpenSSH.Server~~~~0.0.1.0 | |
| Start-Service sshd | |
| Set-Service -Name sshd -StartupType Automatic | |
| New-NetFirewallRule -Name "SSH" -DisplayName "SSH" -Protocol TCP -LocalPort 22 -Action Allow | |
| # RDP | |
| Set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server' -Name "fDenyTSConnections" -Value 0 | |
| Enable-NetFirewallRule -DisplayGroup "Remote Desktop" | |
| # ICMP (ping) | |
| New-NetFirewallRule -Name "ICMP-In" -DisplayName "ICMP In" -Protocol ICMPv4 -Action Allow |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment