Fix: WinRM cannot make the configuration change
Error Description
This error typically occurs when you try to enable or configure the Windows Remote Management (WinRM) service using the winrm quickconfig or Enable-PSRemoting commands. Windows blocks the configuration change because the network location type for one or more of your active network adapters is set to Public.
By default, Windows security policies prohibit WinRM from creating firewall exceptions on public networks to protect your system from unauthorized remote access. To resolve this, you must change your network profile to Private or instruct WinRM to skip the network profile check.
Step-by-Step Fixes
Method 1: Change Network Profile to Private (Recommended)
This is the safest and most permanent solution. It tells Windows that you trust the network you are connected to.
- Right-click the Start menu button and select Windows Terminal (Admin) or PowerShell (Admin).
- View your current network adapters and their categories by typing the following command, then press Enter:
Get-NetConnectionProfile - Look at the NetworkCategory line. If it says Public, note the name listed next to Name.
- Change the network category to Private by running the command below (replace
YourNetworkNamewith the actual name from the previous step):Set-NetConnectionProfile -Name "YourNetworkName" -NetworkCategory Private - Run your original WinRM configuration command again:
winrm quickconfig
Method 2: Use the SkipNetworkProfileCheck Parameter
If you are using Windows PowerShell and want to force the configuration without changing your network settings, you can bypass the firewall restriction check.
- Open PowerShell (Admin).
- Execute the enabling command with the special bypass flag by typing:
Enable-PSRemoting -SkipNetworkProfileCheck -Force - This command configures WinRM to run and creates the necessary local firewall rules while ignoring the public network status.
Method 3: Restart the WinRM Service
Sometimes the service configuration gets locked in a pending state, requiring a manual service refresh.
- Press the Windows Key + R to open the Run dialog box.
- Type
services.mscand press Enter. - Scroll down the list to find Windows Remote Management (WS-Management).
- Right-click on it and select Restart. If it is not running, click Start.
- Double-click the service, change the Startup type to Automatic, and click OK.
- Retry your WinRM setup in the command line.
There may be some errors. Learn Microsoft