title: Retrieving the COM class factory for component with CLSID {688EEEE5-6A7E-422F-B2E1-6AF00DC944A6} failed
body: <p>I am creating application which stop the IIS Default Web Site. I used a PowerShell script to stop website because that script is executed form my website.</p>
  
  <p>This is my script:</p>
  
  <pre><code>Import-Module C:\Windows\System32\WindowsPowerShell\v1.0\Modules\WebAdministration
  Stop-Website 'Default Web Site'
  my copy code
  Start-Website 'Default Web Site'
  </code></pre>
  
  <p>And this is my C# code:</p>
  
  <pre><code>PowerShell _PowerShell = PowerShell.Create();
  
  Runspace rs = RunspaceFactory.CreateRunspace();
  rs.Open();
  
  _PowerShell.Runspace = rs;
  _PowerShell.AddScript(@"Set-ExecutionPolicy RemoteSigned -scope LocalMachine").Invoke();
  _PowerShell.AddScript(@"E:\DE.TEST\Power_Shell\Scripts\StopIISDefaultSite.ps1").Invoke();
  
  if (_PowerShell.HadErrors)
  {
      Collection&lt;ErrorRecord&gt; errors = _PowerShell.Streams.Error.ReadAll();
  
      foreach (var item in errors)
      {
          Console.WriteLine(item.ToString());
      }
  }
  
  Console.ReadLine();
  </code></pre>
  
  <p>It shows the following error </p>
  
  <blockquote>
    <p>Retrieving the COM class factory for component with CLSID {688EEEE5-6A7E-422F-B2E1-6AF00DC944A6} failed due to the following error: 80040154 Class not registered (Exception from HRESULT: 0x80040154 (REGDB_E_CLASSNOTREG)).</p>
  </blockquote>