title: Calling invoke-wmimethod via Powershell PSSession without being admin on Remote Machine?
body: <p>I have a need to execute a batch file on a remote machine, where the batch file being executed resides on a remote fileshare. I have been able to use CredSSP authentication in Powershell to do this assuming my ID is admin on the remote machine, but once I remove the admin access I get the following: </p>
  
  <p><em>Access denied<br>
      + CategoryInfo          : InvalidOperation: (:) [Invoke-WmiMethod], ManagementException<br>
      + FullyQualifiedErrorId : InvokeWMIManagementException,Microsoft.PowerShell.Commands.InvokeWmiMethod</em>                           </p>
  
  <p>I have tried enabling my ID to have full control to Microsoft.Powershell as recommended here but with no luck:
  <a href="http://blogs.msdn.com/b/powershell/archive/2009/11/23/you-don-t-have-to-be-an-administrator-to-run-remote-powershell-commands.aspx" rel="nofollow">http://blogs.msdn.com/b/powershell/archive/2009/11/23/you-don-t-have-to-be-an-administrator-to-run-remote-powershell-commands.aspx</a></p>
  
  <p>The commands I am running:</p>
  
  <pre><code>$s = New-PSSession -computerName $remoteMachine -Credential $cred -Authentication CredSSP
  
  Invoke-Command -Session $s -Scriptblock {param($remoteBatchFile) invoke-wmimethod -path win32_process -name create -argumentlist $remoteBatchFile} -ArgumentList $remoteBatchFile
  
  Remove-PSSession $s
  </code></pre>
  
  <p>Any suggestions for how to resolve the security error? I do have requirements to run the batch file from the network location and for the ID to not be admin on either of the machines. Any suggestions would be appreciated, thanks!</p>