title: PSEXEC to get patch list of remote server
body: <p>I am currently trying to get a patch list of a remote server and export the results on to my c:\temp\ folder or on to a network path. I currently have the below code with PSEXEC. </p>
  
  <pre><code>Psexec \\servername  wmic qfe list brief &gt; \\Pathtofolder\General\Test\patches.txt
  </code></pre>
  
  <p>or if I could get this to export locally on my system</p>
  
  <pre><code>Psexec \\servername  wmic qfe list brief &gt; c:\temp\patches.txt
  </code></pre>
  
  <p>When I run this with the UNC patch I get the below errors:</p>
  
  <p>Couldn't access servername:
  The handle is invalid.
  Connecting to servername...</p>
  
  <p>But if I run the command without putting any export path it works absoloutely fine and returns the correct information to my command window.</p>
  
  <pre><code>Psexec \\servername  wmic qfe list brief 
  </code></pre>
  
  <p>Not sure what else I can do.</p>
  
  <p>Also I can not use the powershell get-hotfixid command I need to use this or similiar.</p>
  
  <p>Thanks in advance,</p>
  
  <p>SG</p>