title: Powershell Get-WmiObject Access is denied
body: <p>I have a Powershell script containing the following line: </p>
  
  <pre><code>$package = Get-WmiObject -Class Win32_Product -ComputerName $TargetServer -Filter ("Name='{0}'" -f $ApplicationName)
  </code></pre>
  
  <p>I followed the steps on this answer in order to enable Powershell Remoting between the servers: <a href="https://stackoverflow.com/questions/8362057/what-security-setting-is-preventing-remote-powershell-2-0-from-accessing-unc-pat">remoting security steps</a> </p>
  
  <p>When I run the script from the Powershell ISE (in an elevated admin window) then I get the following error: </p>
  
  <pre><code>Get-WmiObject : Access is denied. (Exception from HRESULT: 0x80070005 (E_ACCESSDENIED))
  At line:1 char:14
  + Get-WmiObject &lt;&lt;&lt;&lt;  win32_bios -computername d-vasbiz01
  + CategoryInfo          : NotSpecified: (:) [Get-WmiObject], UnauthorizedAccessException
  + FullyQualifiedErrorId : System.UnauthorizedAccessException,Microsoft.PowerShell.Commands.GetWmiObjectCommand
  </code></pre>
  
  <p>I need to be able to run the script in the ISE so that I can troubleshoot other problems.</p>
  
  <p>Can anyone please suggest what I need to do to fix this security error?</p>