title: "XML is invalid" when Get-CimInstance is supplied with -ComputerName
body: <p>I've been googling around for a while but can't seem to find the right answer. </p>
  
  <p>My laptop is part of an AD domain. I use it to explore/develop tools in PowerShell and WMI. I noticed whenever I Get-CimInstance on the Win32_ComputerSystem class with <code>-ComputerName</code>, I get the <code>XML is Invalid</code> error:</p>
  
  <pre><code>PS C:\Users\jsung&gt; Get-CimInstance -ClassName Win32_ComputerSystem -ComputerName jsung03-pc
  Get-CimInstance : The WS-Management service cannot process the request because the XML is invalid.
  At line:1 char:1
  + Get-CimInstance -ClassName Win32_ComputerSystem -ComputerName jsung03-pc
  + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  + CategoryInfo          : ParserError: (root\cimv2:Win32_ComputerSystem:String) [Get-CimInstance], CimException
  + FullyQualifiedErrorId : HRESULT 0x80338043,Microsoft.Management.Infrastructure.CimCmdlets.GetCimInstanceCommand
  + PSComputerName        : jsung03-pc
  </code></pre>
  
  <p>jsung03-pc is the hostname of my laptop. If I take out the <code>-ComputerName</code> argument, the query returns a result w/o any issue. </p>
  
  <p>The same symptom occur on my laptop and desktop. Both are running Windows 7 SP1. I loaded RSAT 4.0 and .NET 4.5.2. WinRM and WsMAN were enabled via Enable-PSRemoting.</p>
  
  <pre><code>PS C:\Users\jsung&gt; $PSVersionTable.PSVersion
  Major  Minor  Build  Revision
  -----  -----  -----  --------
  4      0      -1     -1
  
  PS C:\Users\jsung&gt; Get-Service wi*
  Status   Name               DisplayName
  ------   ----               -----------
  Stopped  WinDefend          Windows Defender
  Running  WinHttpAutoProx... WinHTTP Web Proxy Auto-Discovery Se...
  Running  Winmgmt            Windows Management Instrumentation
  Running  WinRM              Windows Remote Management (WS-Manag...
  </code></pre>
  
  <p>If I remove <code>-ComputerName jsung03-pc</code> the cmdlet returns a result w/o error:</p>
  
  <pre><code>PS C:\Users\jsung&gt; Get-CimInstance -ClassName Win32_ComputerSystem
  Name             PrimaryOwnerName         Domain                   TotalPhysicalMemory      Model                   Manufacturer
  ----             ----------------         ------                   -------------------      -----                   ------------
  JSUNG03-PC       ntapadmin           &lt;domain.com&gt;            4147822592               4384BE6                 LENOVO
  </code></pre>
  
  <p>This issue is not shown in querying the "Win32_Process" class. </p>
  
  <p>Test-WSMan shows the system is running 3.0.</p>
  
  <pre><code>PS C:\Users\jsung&gt; Test-WSMan -ComputerName jsung03-pc -Authentication Default
  wsmid           : http://schemas.dmtf.org/wbem/wsman/identity/1/wsmanidentity.xsd
  ProtocolVersion : http://schemas.dmtf.org/wbem/wsman/1/wsman.xsd
  ProductVendor   : Microsoft Corporation
  ProductVersion  : OS: 6.1.7601 SP: 1.0 Stack: 3.0
  </code></pre>
  
  <p>I ran the WMI Diagnosis Utility and tried to recover the repository via <code>cscript WMIDiag.vbs   WriteInRepository=Root</code> but still no luck. There is little to no info about <code>XML is invalid</code>.</p>
  
  <p>Can anyone shed some light on what database may be corrupted and how to fix this?</p>