Windows Error Fix: WinRM cannot complete the operation
Error Description
The "WinRM cannot complete the operation" error typically occurs when the Windows Remote Management (WinRM) service is unable to process a request. This happens due to misconfigured WinRM settings, a stopped WinRM service, strict Windows Firewall rules, or issues with network location profiles (such as a public network blocking remote management). It prevents administrators from managing the system remotely via PowerShell or other management tools.
Step-by-Step Fixes
Step 1: Start and Configure the WinRM Service
The WinRM service must be running and set to start automatically for remote management to function.
- Press Windows Key + R to open the Run dialog box.
- Type
services.mscand press Enter. - Scroll down and locate the Windows Remote Management (WS-Management) service.
- Right-click the service and select Properties.
- Change the Startup type to Automatic.
- If the service status is stopped, click the Start button.
- Click Apply and then OK to save the changes.
Step 2: Run the Quick Config Command
Windows includes a built-in tool to automatically configure WinRM with standard settings and open the required firewall ports.
- Right-click the Start menu icon and select Terminal (Admin) or Command Prompt (Admin).
- Type the following command and press Enter:
winrm quickconfig - If prompted to make changes and enable the service, type
y(Yes) and press Enter. - If prompted to create a WinRM listener, type
yand press Enter again.
Step 3: Change Network Profile from Public to Private
WinRM often fails on networks classified as "Public" because Windows security policies block remote administration on untrusted networks by default.
- Right-click the Wi-Fi or Ethernet icon in your system tray (bottom right corner) and select Network and Internet settings.
- Click on Properties for your active network connection.
- Change the network profile type from Public network to Private network.
- Open PowerShell as an Administrator and try running
winrm quickconfigagain to see if it succeeds.
Step 4: Configure LocalAccountTokenFilterPolicy
If you are trying to connect using local administrator credentials on a workgroup computer, User Account Control (UAC) might block the connection. Creating a specific registry key bypasses this restriction.
- Press Windows Key + R, type
regedit, and press Enter to open the Registry Editor. - Navigate to the following path:
HKEY LOCAL MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies\System - Right-click an empty space in the right pane, hover over New, and select DWORD (32-bit) Value.
- Name the new value exactly:
LocalAccountTokenFilterPolicy - Double-click LocalAccountTokenFilterPolicy, change its Value data to
1, and click OK. - Restart your computer for the changes to take effect.
Step 5: Add Target Hosts to the TrustedHosts List
If you are connecting to a remote machine outside of an Active Directory domain environment, your client machine needs to explicitly trust the remote host.
- Open PowerShell as an Administrator.
- To trust all remote computers (common for testing environments), type the following command and press Enter:
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "*" -Force - If you only want to trust a specific computer, replace the asterisk with the IP address or hostname of that computer:
Set-Item WSMan:\localhost\Client\TrustedHosts -Value "192.168.1.50" -Force - Restart the WinRM service to apply the change:
Restart-Service WinRM
ERROR_WSMAN_ADDOBJECT_MISSING_OBJECT | ERROR_WSMAN_ADDOBJECT_MISSING_EPR | ERROR_WINRS_RECEIVE_IN_PROGRESS | ERROR_WINRS_RECEIVE_NO_RESPONSE_DATA | ERROR_WINRS_CLIENT_CREATESHELL_NULL_PARAM
There may be some errors. Learn Microsoft