Skip to content

Commit

Permalink
Update configure-winrm.ps1
Browse files Browse the repository at this point in the history
  • Loading branch information
LeftTwixWand authored Jan 22, 2024
1 parent e991622 commit c49aebd
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions scripts/configure-winrm.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# New-NetFirewallRule -DisplayName "Enable WinRM 5985" -Direction Inbound -LocalPort 5985 -Protocol TCP -Action Allow
# Restart-Service winrm

winrm enumerate winrm/config/listener;

winrm quickconfig;

$ip = "10.1.0.5";
Expand All @@ -17,6 +19,7 @@ winrm create winrm/config/Listener?Address=*+Transport=HTTPS '@{Hostname="'"$ip"
winrm enumerate winrm/config/listener;

# Add a new firewall rule
Write-Host "Add network rule";
$port=5986;
netsh advfirewall firewall add rule name="Windows Remote Management (HTTPS-In)" dir=in action=allow protocol=TCP localport=$port;

Expand Down

0 comments on commit c49aebd

Please sign in to comment.