title: Regarding permissions for Get-ScheduledTask via remote powershell
body: <p>My problem is as follows:</p>
  
  <ul>
  <li>I have two users on a windows server (Windows Server 2016). One is my regular user (with admin privileges) and the other a technical user.</li>
  <li>I would like to probe for a given scheduled task on a remote machine (which is a Windows Server 2016 as well). To do so i use "Invoke-Command" and pass the session as follows:</li>
  </ul>
  
  <pre><code>Invoke-Command -Session $session -ScriptBlock { Get-ScheduledTask -TaskName &lt;task_name&gt;}
  </code></pre>
  
  <ul>
  <li>For my regular user this works (i am using localhost for testing, but also verified this against a different server)</li>
  <li>For the technical user it does not. However, the command </li>
  </ul>
  
  <pre><code>Get-ScheduledTask -TaskName &lt;task_name&gt;
  </code></pre>
  
  <p>executed in the technical users' powershell WORKS.</p>
  
  <ul>
  <li>Further (executed as the technical user), the following works as well</li>
  </ul>
  
  <pre><code>Invoke-Command -Session $session -ScriptBlock { Get-ChildItem C:\ }
  </code></pre>
  
  <p>So what i take from this is that for the technical user in general remoting works as well access to the scheduled tasks. However, somehow the combination does NOT. </p>
  
  <p>The exception is get is</p>
  
  <pre><code>Access denied 
      + CategoryInfo          : PermissionDenied: (MSFT_ScheduledTask:Root/Microsoft/...T_ScheduledTask) [Get-ScheduledTask], CimException
      + FullyQualifiedErrorId : HRESULT 0x80041003,Get-ScheduledTask
      + PSComputerName        : &lt;hostname&gt;
  </code></pre>
  
  <p>So obviously this is a permission issue. But i do not get what i need to change to fix it. I tried to compare the different permission between my regular user and the technical user, however I did not spot anything immediately obvious.</p>
  
  <p>Does anyone know what needs to be changed?</p>