This repository has been archived on 2025-07-27. You can view files and clone it, but cannot push or open issues or pull requests.
Files
ClusterAPI.imageBuilder/REMOVED/packer/ova/windows/disable-winrm.ps1
Danny Bessems a32a6c9c0c
Some checks reported errors
continuous-integration/drone/push Build encountered an error
Attempt native imagebuilder image
2023-02-23 21:17:50 +01:00

9 lines
370 B
PowerShell

netsh advfirewall firewall set rule name="Windows Remote Management (HTTP-In)" new enable=yes action=block
netsh advfirewall firewall set rule group="Windows Remote Management" new enable=yes
$winrmService = Get-Service -Name WinRM
if ($winrmService.Status -eq "Running"){
Disable-PSRemoting -Force
}
Stop-Service winrm
Set-Service -Name winrm -StartupType Disabled