Error when Querying WMI Namespace: root/MSCluster

Doug5
Tera Contributor

I am getting this error in the MID Server log file (and in the Pattern Log). See ERROR below.

 

I ran some PowerShell (see below) to investigate this issue. My Question is Why is the Pattern querying the WMI Namespace root/MSCluster for most or all Windows Servers? This seams unnecessary and is causing unnecessary errors.  You can see from my PowerShell output  for WMI QUERY 1 that this Namespace does not exist. The Pattern should perform Query 1 first for all Windows Servers - and should only query root/MSCluster if this namespace is found to exist.

Have I made a mistake?  Any thoughts?


=============================== ERROR ==========================================


2025-11-10T07:56:10.881+1300 DEBUG (Worker-Standard:HorizontalDiscoveryProbe-b7950bea338d3210323854b46d5c7b25) [APowerShellProvider:317] (168)APowerShellProvider - Error during execution of Windows command: executeQuery -Namespace root/MSCluster -Query "SELECT Caption,Description,Name,State,Status,Type,PrivateProperties FROM MSCluster_Resource". executeQuery : Could not get query SELECT Caption,Description,Name,State,Status,Type,PrivateProperties FROM MSCluster_Resource on namespace=root/MSCluster. Original Exception: The target namespace does not exist.
At line:1 char:5
+ & { executeQuery -Namespace root/MSCluster -Query "SELECT Caption,Des ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,executeQuery

com.snc.automation_common.integration.exceptions.InvalidCommandException: executeQuery : Could not get query SELECT Caption,Description,Name,State,Status,Type,PrivateProperties FROM MSCluster_Resource on namespace=root/MSCluster. Original Exception: The target namespace does not exist.
At line:1 char:5
+ & { executeQuery -Namespace root/MSCluster -Query "SELECT Caption,Des ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Write-Error], WriteErrorException
+ FullyQualifiedErrorId : Microsoft.PowerShell.Commands.WriteErrorException,executeQuery



#####################################################################
#################### POWERSHELL ####################################
#####################################################################
$UserName = "MERIDIAN\svc_iTOMAdminWindows"
$Password = "*********************"
# Convert the plain-text password to a SecureString
$securePassword = ConvertTo-SecureString -String $password -AsPlainText -Force
# Create the PSCredential object
$credential = New-Object System.Management.Automation.PSCredential($username, $securePassword)

$Namespace = "Root\Microsoft\SqlServer\ComputerManagement13"
# $computer = "10.160.204.114"
$computer = "10.160.201.216"

Write-Host "`n ################### WMI QUERY 1 ######################"
$Query1 = "SELECT Name FROM __NAMESPACE"
$Result1 = Get-WmiObject -NameSpace "root" -Query $query1 -Computer $Computer -Credential $Credential -ErrorAction Stop
Write-Host $Result1

Write-Host "`n ################### WMI QUERY 2 ######################"
$Query2 = "SELECT Caption,Description,Name,State,Status,Type,PrivateProperties FROM MSCluster_Resource"
$Result2 = Get-WmiObject -NameSpace "root/MSCluster" -Query $query2 -Computer $Computer -Credential $Credential -ErrorAction Stop
Write-Host $Result2

============================= OUTPUT =====================================

################### WMI QUERY 1 ######################
__NAMESPACE.Name="subscription" __NAMESPACE.Name="DEFAULT" __NAMESPACE.Name="cimv2" __NAMESPACE.Name="msdt
c" __NAMESPACE.Name="Cli" __NAMESPACE.Name="Nap" __NAMESPACE.Name="SECURITY" __NAMESPACE.Name="SmsDm" __NA
MESPACE.Name="CCMVDI" __NAMESPACE.Name="RSOP" __NAMESPACE.Name="PEH" __NAMESPACE.Name="WebAdministration"
__NAMESPACE.Name="ccm" __NAMESPACE.Name="MEM" __NAMESPACE.Name="StandardCimv2" __NAMESPACE.Name="WMI" __NA
MESPACE.Name="AccessLogging" __NAMESPACE.Name="directory" __NAMESPACE.Name="Policy" __NAMESPACE.Name="Inve
ntoryLogging" __NAMESPACE.Name="Interop" __NAMESPACE.Name="Hardware" __NAMESPACE.Name="ServiceModel" __NAM
ESPACE.Name="Microsoft" __NAMESPACE.Name="Appv"

################### WMI QUERY 2 ######################
Get-WmiObject : Invalid namespace "root/MSCluster"
At C:\Users\a_dc38\Documents\test-Cluster.ps1:19 char:12
+ $Result2 = Get-WmiObject -NameSpace "root/MSCluster" -Query $query2 - ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [Get-WmiObject], ManagementException
+ FullyQualifiedErrorId : GetWMIManagementException,Microsoft.PowerShell.Commands.GetWmiObjectComman
d

10 REPLIES 10

Hi @bigfissy 

I understand that if the Failover cluster feature is enabled but there is no cluster configured. The query in the pattern step fails.

 

My resolution was to disable the feature

 

Regards,
Bhavani Shankar
Linked In