Skip to content

TechDirectArchive

Hands-on IT, Cloud, Security & DevOps Insights

  • Home
  • About
  • Advertise With US
  • Reviews
  • Contact
  • Toggle search form
Home » Windows » WinRM cannot complete the operation, verify that the specified computer name is valid

WinRM cannot complete the operation, verify that the specified computer name is valid

Posted on 03/02/202301/08/2024 Christian By Christian 3 Comments on WinRM cannot complete the operation, verify that the specified computer name is valid
what is winrm

Windows Remote Management (WinRM) is the Microsoft implementation of WS-Management Protocol, a standard Simple Object Access Protocol (SOAP)-based, firewall-friendly protocol that allows hardware and operating systems, from different vendors, to interoperate. In this guide, you will learn how to fix the following error “WinRM cannot complete the operation, verify that the specified computer name is valid, that the computer is accessible over the network, and that a firewall exception for the WinRM service is enabled”. Please see Step-by-step guide on how to set up the Synology DS923+ NAS, and How to Configure Server Core using Sconfig.

The WS-Management protocol specification provides a common way for systems to access and exchange management information across an IT infrastructure.

Please refer to these related guides: How to fix the following error occurred while using Kerberos authentication, cannot find the computer, and how to configure a remote server (windows) to Support Ansible.

Is WinRM Enabled by Default?

WinRM is enabled by default on all Windows Server operating systems since Windows Server 2012 and above, but disabled on all client operating systems like Windows 10 and Windows 11 at the time of writing this guide.

  • WinRM is started automatically on newer versions of Windows Server. (that is from WS 2008) to be precise at the time of writing this piece. 

Note: WinRM is not configured by default on Windows PCs or Servers, even when WinRM service is running.

As mentioned in the first paragraph,  WinRM establishes a session with a remote computer through the SOAP-based WS-Management protocol rather than a connection through DCOM, as WMI does. The CimInstance cmdlets interact with Common Information Model (CIM) Servers like the Windows Management Instrumentation (WMI) service.

Data returned to the WS-Management protocol are formatted in XML rather than in objects. As you are aware, the Get-WmiObject cmdlet has been superseded with the Get-CimInstance cmdlets as discussed in this guide “How to get a list of installed applications using PowerShell in Windows“, and because of some comments on this blog post.

This birthed this guide on how to get a list of installed programs in Windows. Below are some of the errors you might encounter while performing this operation.

image-7

The solution to resolving WinRM cannot complete the operation

WinRM is automatically installed with all currently-supported versions of the Windows operating system, but needs o be confiured on client PCs.

When prompted with the following error above, the first step to resolve this issue is to verify if WinRM is running on the device. As you can see in the image below, this is not the case.

This is because, for Windows Remote Management (WinRM) scripts to run, and for the Winrm command-line tool to perform data operations, Windows Remote Management (WinRM) has to be configured. Therefore, we will have to configure WinRM in order to be able to receive requests.

image-13

Here is a guide on how to fix Get-CimInstance Access PermissionDenied: (root\cimv2:Win32_OperatingSystem String) [Get-CimInstance], CimException on Windows.

Configure WinRM with default settings

Type winrm quickconfig at a command prompt. As you can see, I am running PowerShell as an Administrator. This is because I am not running under the local computer Administrator account.

Kindly pay attention to the prompts as shown below. When the tool displays Make these changes [y/n]? Kindly type y to proceed.

image-14

As you can see below, we have successfully configured WInRM, and it is running.

image-15

Now that we are done configuring WinRM. If you do not have Administrative rights to connect to the remote device, the following error below will be prompted.

image-8

To resolve this issue, you will need to grant the necessary rights locally or via a security group. Here is a related guide on allowing RDP access for non administrators. Since I am part of a Security Group that has Administrative privileges on this device. I will have to run the Command Prompt as a different user to be able to perform my task without further errors.

C:\Users\yourname\AppData\Roaming\Microsoft\Windows\Start Menu\Programs\System Tools

To do this, kindly access the Command Prompt via the File Explorer and right click on it. Then select “Run as a different user”.

image-9

You will be required to enter your Username and Password. Kindly enter the credential that has administrative rights on the device you wish to manage remotely.

image-10

Also, see how to determine Windows PowerShell version and to see if WinRM is running via Test-WSMan, and how to add servers to the Trusted Hosts list via PowerShell and command Prompt for the WinRM client.

Remotely Query the List of Installed Apps

Proceed and perform any action you wish on the remote device. Since I would like to query the list of installed applications on that device. I will be running the command below. Please replace “TechPC!” with your device name.

PS C:\WINDOWS\system32> Get-CimInstance -class Win32_Product -Computer techPC1
image-11

To query remote devices, kindly run the command below. In the past, we have always achieved this with the Get-Wmi-Object.

But has been superseded with the CimInstance, below is the new command to use. You can also query the list of installed apps by Vendor as you wish.

PS C:\Windows> Get-CimInstance -Class Win32_Product -Computer TechdaPC2 | where vendor -eq 'Microsoft Corporation' | select Name, Version
PS C:\Windows> Get-CimInstance -Class Win32_Product -Computer TechdaPC2
determinremoteinstallapps

I hope you found this blog post on “WinRM cannot complete the operation, verify that the specified computer name is valid” helpful. If you have any questions, please let me know in the comment session.

5/5 - (1 vote)

Thank you for reading this post. Kindly share it with others.

  • Share on X (Opens in new window) X
  • Share on Reddit (Opens in new window) Reddit
  • Share on LinkedIn (Opens in new window) LinkedIn
  • Share on Facebook (Opens in new window) Facebook
  • Share on Pinterest (Opens in new window) Pinterest
  • Share on Tumblr (Opens in new window) Tumblr
  • Share on Telegram (Opens in new window) Telegram
  • Share on WhatsApp (Opens in new window) WhatsApp
  • Share on Mastodon (Opens in new window) Mastodon
  • Share on Bluesky (Opens in new window) Bluesky
  • Share on Threads (Opens in new window) Threads
  • Share on Nextdoor (Opens in new window) Nextdoor
Windows Tags:Configure WinRM, Firewall, Windows 10, Windows 11, Windows Server 2016

Post navigation

Previous Post: MBAM Policy was detected: Verify the OU used for pre-deployment does not apply MBAM policy
Next Post: Get a list of installed programs locally or remotely in Windows

Related Posts

  • schedulepythontasksinWindows
    Task Scheduler shows task still running despite successful Windows
  • Uninstall MicrosoftDefenderUpdate
    What you need to know about Microsoft Defender Antivirus Security | Vulnerability Scans and Assessment
  • linkyourandriodtoyourpc
    Microsoft Phone Link: Connect Android to Windows 11 Windows
  • TeamPass Password manager
    Install and configure TeamPass Password Manager Password Manager
  • Featured image batch file.
    Retrieve Recent Windows Update: How to create batch script files Scripts
  • Featured Image
    Remote WMI Connection: How to enable or disable WMI Traffic Using Firewall UI Windows

More Related Articles

schedulepythontasksinWindows Task Scheduler shows task still running despite successful Windows
Uninstall MicrosoftDefenderUpdate What you need to know about Microsoft Defender Antivirus Security | Vulnerability Scans and Assessment
linkyourandriodtoyourpc Microsoft Phone Link: Connect Android to Windows 11 Windows
TeamPass Password manager Install and configure TeamPass Password Manager Password Manager
Featured image batch file. Retrieve Recent Windows Update: How to create batch script files Scripts
Featured Image Remote WMI Connection: How to enable or disable WMI Traffic Using Firewall UI Windows

Comments (3) on “WinRM cannot complete the operation, verify that the specified computer name is valid”

  1. Avatar photo Patrick says:
    03/02/2023 at 4:37 PM

    Hi,

    Just looking for some clarification on something. When you say “Enter the credentials that has administrative rights on the device you wish to manage remotely ” , Do you mean we have to physically go to the device to enter the credentials?

    It is not very clear what we have to do for that part.

    Log in to Reply
    1. chris Christian says:
      03/02/2023 at 4:48 PM

      Hi, it depends. Ensure you are part of the Local Administrator’s group. With this account, you should be able to remotely administer it.

      Log in to Reply
    2. chris Christian says:
      04/02/2023 at 12:19 PM

      I would suggest you take a look at this guide for more information about user account/access control: https://techdirectarchive.com/2022/11/30/all-you-need-to-know-about-local-accounts-authorization-and-access-control-in-windows/

      Log in to Reply

Leave a Reply Cancel reply

You must be logged in to post a comment.

Microsoft MVP

VEEAMLEGEND

vexpert-badge-stars-5

Virtual Background

GoogleNews

Categories

veeaam100

Veeam Vanguard

  • PetitPotam
    PetitPotam attack on Active Directory Certificate Services: How to mitigate NTLM Relay PetitPotam attack on AD CS Security | Vulnerability Scans and Assessment
  • telnet
    Could not open a connection to the host, on the port, connect failed Windows Server
  • article 1280x720.aa742702
    How to create a custom view in Windows Event Viewer Windows Server
  • Disable Open File Security Warnings on Windows
    How to Disable Open File Security Warnings on Windows Security | Vulnerability Scans and Assessment
  • remote desktop connection 5 1280x720 1
    How to view and remove Remote Desktop connection history Windows
  • unnamed 2
    How to create a contact in Active Directory Windows Server
  • Enable only Windows Admin to shutdown PC
    Allow only Administrators to shut down and reboot Server Windows
  • Add a second domain to your domain
    How to add a new Domain Controller to an Existing Domain Windows Server

Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 1,808 other subscribers
  • RSS - Posts
  • RSS - Comments
  • About
  • Authors
  • Write for us
  • Advertise with us
  • General Terms and Conditions
  • Privacy policy
  • Feedly
  • Telegram
  • Youtube
  • Facebook
  • Instagram
  • LinkedIn
  • Tumblr
  • Pinterest
  • Twitter
  • mastodon

Tags

AWS Azure Bitlocker Microsoft Windows PowerShell WDS Windows 10 Windows 11 Windows Deployment Services Windows Server 2016

Copyright © 2025 TechDirectArchive

Loading Comments...

You must be logged in to post a comment.