Last active
August 3, 2022 20:25
-
-
Save clong/959bc5abe14cb5989c985d4156b5c335 to your computer and use it in GitHub Desktop.
This file contains 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
powershell.exe -c "Set-NetConnectionProfile -InterfaceAlias Ethernet -NetworkCategory Private" | |
powershell.exe -c "Enable-PSRemoting -Force" | |
winrm quickconfig -q | |
winrm quickconfig -transport:http | |
powershell.exe -c "winrm set winrm/config '@{MaxTimeoutms=\`"1800000\`"}'" | |
powershell.exe -c "winrm set winrm/config/winrs '@{MaxMemoryPerShellMB=\`"800\`"}'" | |
powershell.exe -c "winrm set winrm/config/service '@{AllowUnencrypted=\`"true\`"}'" | |
powershell.exe -c "winrm set winrm/config/service/auth '@{Basic=\`"true\`"}'" | |
powershell.exe -c "winrm set winrm/config/client/auth '@{Basic=\`"true\`"}'" | |
netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" new enable=yes action=allow remoteip=any | |
powershell.exe -c "Restart-Service winrm" | |
netsh advfirewall firewall add rule name="Port 5985" dir=in action=allow protocol=TCP localport=5985 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment