Unable to Resolve WSDL Method Name QueryServiceEndpointList Using PowerCLI Tagging Cmdlets
search cancel

Unable to Resolve WSDL Method Name QueryServiceEndpointList Using PowerCLI Tagging Cmdlets

book

Article ID: 452188

calendar_today

Updated On:

Products

VMware vCenter Server

Issue/Introduction

  • When attempting to run modern PowerCLI tagging cmdlets (such as Get-Tag or New-TagAssignment), the script or command fails immediately. The vCenter vAPI Endpoint service is verified to be running and healthy, yet the following error is thrown in the PowerShell console:

Get-Tag : Unable to resolve WSDL method name QueryServiceEndpointList in vim.version.version7 (internalvim25/5.0)while parsing SOAP body...

  • If a script attempts to pipe or pass the result of Get-Tag to New-TagAssignment, a secondary cascading error will appear due to the missing tag object:

New-TagAssignment : Value cannot be null. Parameter name: collection

 

Environment

  • VMware vCenter Server
  • VMware PowerCLI

Cause

  • PowerCLI connects to vCenter using two distinct underlying endpoints:

    • SOAP API (for legacy components) and
    • vAPI (for modern components like Tags).

  • The underlying CIS module (VMware.VimAutomation.Cis.Core) fails to load or crashes silently during the initial connection to vCenter due to corrupted PowerCLI modules or conflicting assembly versions (e.g., overlapping .dll files) on the local machine executing the script.

  • As the vAPI connection fails, PowerCLI falls back to the legacy vSphere 5.0 SOAP method, which does not support tagging, resulting in the internalvim25/5.0 error.

Resolution

To resolve this issue, the local PowerCLI environment must be completely purged of all VMware modules and reinstalled cleanly.

Verification Steps:

  1. Open PowerShell as Administrator.

  2. Verify if the module is installed. If it returns a version, proceed to the next step. If it returns nothing, the module is missing and simply needs to be installed: Get-Module -Name VMware.VimAutomation.Cis.Core -ListAvailable

  3. Bypass SSL warnings and disconnect stale sessions: Set-PowerCLIConfiguration -InvalidCertificateAction Ignore -Confirm:$false Disconnect-VIServer * -Confirm:$false

  4. Attempt to connect explicitly to the CIS server to expose the underlying assembly corruption error: Connect-CisServer -Server <vCenter_HOSTNAME/IP>

Clean Reinstall Steps:

  1. Uninstall all existing VMware modules forcefully (allow the command to finish completely even if red dependency text is generated): Get-Module -Name VMware.* -ListAvailable | Uninstall-Module -Force -AllVersions

  2. Verify total removal: Get-Module -Name VMware.* -ListAvailable (Note: If modules still appear, manually navigate to C:\Program Files\WindowsPowerShell\Modules and delete all folders prefixed with VMware.)

  3. Install a fresh copy of PowerCLI: Install-Module -Name VMware.PowerCLI -Force -AllowClobber -Scope AllUsers

  4. Restart the PowerShell session and attempt the connection again. Get-Tag should now successfully query the vCenter vAPI endpoint.

Additional Information

As a temporary workaround, the script can be run from a different Jumpbox with a healthy, uncorrupted PowerCLI installation.