title: Running PS cmdlets from remote under non-admin users - Access Denied
body: <p>I'm trying to run Get-ScheduledTask remotely through Invoke-Command.
  The user is a non-admin but is a part of the &quot;Remote Management Users&quot;.
  PS-Remoting works fine.
  Running the command locally works fine.
  But running it through Invoke-Command gets me the following error:</p>
  <pre><code>Cannot connect to CIM server. Access denied
      + CategoryInfo          : ResourceUnavailable: (MSFT_ScheduledTask:String) [Get-ScheduledTask], CimJobException
      + FullyQualifiedErrorId : CimJob_BrokenCimSession,Get-ScheduledTask
      + PSComputerName        : us-web1
  </code></pre>
  <p>Here's the code sample:</p>
  <h1>Note: this is running directly under the non-admin user in question.</h1>
  <pre><code>$servers = &quot;us-web1&quot;,&quot;us-web2&quot;,&quot;us-engine1&quot;,&quot;us-engine2&quot;,&quot;us-engine3&quot;,&quot;us-engine4&quot;
  
  foreach ( $server in $servers ) { 
  
  Invoke-Command -ComputerName &quot;$server&quot; -ScriptBlock {
  
        get-scheduledtask
      }
  }
  </code></pre>