I was wondering if its possible to take a screenshot for a remote users screen.
My script is for desktop support users and one of them asked is it possible to do this.
So when a users says whats this on my screen you can do a quick screen capture instead of going through the whole remote assist.
I was thinking if it's possible i would try and get the script to send a confirmation message to the user before running the script
Any assistance would be appriciated
And instead of using that tool what is suggested there, you can use Invoke-Command to execute the code on the remote computer. See this blogpost: https://4sysops.com/archives/use-powershell-invoke-command-to-run-scripts-on-remote-computers/
While not what you're asking, I think PSR is ideal for these scenarios (problem step recorder, been built-in for awhile now). Have them run PSR, hit record, then recreate the problem. It will save screenshots and actions into a zip for you (up to 100 steps, so don't try to leave it on all day).
I know this is an old post, but no external tools necessary for this (taking screenshot of remote PC without remoting on). Powershell only. See below:
Basically this will ask for a PC and user name. It will copy over a script (Screenshot_Desktop.ps1) to the temp directory of the remote PC and will then capture the correct session ID. It will then start the script on the remote pc and deposit the screenshot in the remote PC's temp directory. There is a brief flash on the remote PC when screenshot it taken.
Script to trigger Screenshot_Desktop.ps1 below:
Write-Host "THIS ONLY WORKS IF SCREEN IS NOT LOCKED"
$ComputerName = Read-Host -Prompt 'PLEASE ENTER PC NAME'
# Copies script to remote PC
#Captures correct session ID
$results = psexec \\$ComputerName query session
# Allows script to execute on remote PC
psexec \\$ComputerName POWERSHELL set-executionpolicy remotesigned
#Takes screenshot of remote PC
psexec -s -i $id \\$ComputerName POWERSHELL -WindowStyle Hidden -file "C:\Temp\SCREENSHOT_DESKTOP.ps1"
Screenshot_Desktop.ps1 script copied to remote PC from above:
$File = "C:\Temp\Screenshot1.bmp"
# That's it. Hope this helps people looking for a Powershell Only solution.
You must be logged in to reply to this topic.