title: How to take a remote screenshot with Powershell
body: <p>I'm trying to figure out how to take remote screenshots over PowerShell from an administrator's account on the AD server to any computer on the network.</p>
  
  <p>So far I've got the following.</p>
  
  <pre><code> $ComputerName = '&lt;THECOMPUTER&gt;'
  
   copy-item "C:\Public\Software\Take-Screenshot.ps1" "\\$ComputerName\C$\"
  
   Invoke-Command -ComputerName $ComputerName -ScriptBlock {
       powershell -nop -c "C:\Take-Screenshot.ps1"
   } 
  </code></pre>
  
  <p><code>Take-Screenshot.ps1</code> is in from <a href="https://gallery.technet.microsoft.com/scriptcenter/eeff544a-f690-4f6b-a586-11eea6fc5eb8" rel="nofollow noreferrer">here</a>, but I've added the following to the bottom of the script to actually run the function.</p>
  
  <pre><code>Take-ScreenShot -screen -file C:\s.png -imagetype png 
  </code></pre>
  
  <p>After the screenshot is taken, I'll copy it back to the host, but the problem is the picture is completely black.</p>
  
  <p>I'm thinking this might be because the powershell is running the program, but there's not session attached to it, so there really is not screen?? </p>