title: Install Windows service on a remote machine using PowerShell 2.0
body: <p>I want to use PowerShell 2.0 to install a Windows service after detecting if the service exists. I have the part to detect the service working but can't get the install to work.</p>
  
  <pre><code>$mc = [wmiclass]"\\"+"$ServiceServer\ROOT\CIMV2:Win32_Service"
  </code></pre>
  
  <p>Running this line produces this error:</p>
  
  <blockquote>
    <p>Method invocation failed because [System.Management.ManagementClass] doesn't
    contain a method named 'op_Addition'.</p>
  </blockquote>