Common Causes
- Public Network Profile: WinRM is strictly blocked from making automated firewall configurations on a network classified as Public. Your network connection profile must be set to Domain or Private.
- Broken or Corrupted Listeners: Existing broken WinRM listeners or corrupted registry states block the system from applying new configuration profiles.
- Insufficient Administrative Privileges: Running the setup utilities from a regular command prompt or a terminal that does not possess elevated administrative rights.
Step-by-Step Fixes
Step 1: Change the Network Profile to Private
WinRM will fail if your current network connection is set to "Public". You must change it to "Private".
- Right-click the Start menu and select Windows Terminal (Admin) or PowerShell (Admin).
- Run the following command to identify your current network connection index and type:
Get-NetConnectionProfile - Look at the
NetworkCategoryline. If it saysPublic, you must change it. - Run the following command to switch your connection type to Private (replace
NameYourNetworkwith the actual name shown underInterfaceAliasorNamein your previous command):Set-NetConnectionProfile -Name "NameYourNetwork" -NetworkCategory Private
Step 2: Delete Existing Broken Listeners
If a corrupted listener configuration exists on port 5985 or 5986, it prevents the updater service from making configurations.
- In your elevated PowerShell window, look up all currently configured active listeners:
winrm enumerate winrm/config/listener - Clear out the broken HTTP or HTTPS listeners by using the delete commands below:
winrm delete winrm/config/Listener?Address=*+Transport=HTTP winrm delete winrm/config/Listener?Address=*+Transport=HTTPS
Step 3: Run the WinRM Configuration Restore
You can force Windows Management instrumentation to reset the configuration variables to their original parameters.
- Execute the built-in system restoration operation for WinRM:
winrm invoke Restore winrm/Config
Step 4: Re-enable PowerShell Remoting and Quick Config
Once the environment variables have been cleaned, run the default automated setup script.
- Initiate the standard WinRM initialization script:
winrm quickconfig - Type Y and press Enter when prompted to confirm the configuration alterations.
- Finalize the initialization process by setting up PowerShell deployment capabilities:
Enable-PSRemoting -Force
Step 5: Restart the WinRM Service
Force Windows to cycle and apply the clean operational configuration changes you just established.
- Run this final command to restart the management suite:
Restart-Service -Name WinRM
There may be some errors. Learn Microsoft