I've seen a couple posts about this but they are a bit old now and lacked the ability to capture multiple monitors. I've attempted to get some Powershell scripts to work but they aren't saving any files for me successfully yet not giving errors either.
1. copy source from git, paste it to a text editor or Powershell ISE and at the end append the following line after the bracket that closes the function:
Get-TimedScreenshot -Path c:\temp\ -Interval 60 -EndTime 22:00
2. Save this file as c:\ss.ps1
3. Open up powershell and type in command prompt:
4. Go to temp folder and check your jpgs.
I was able to use the powershell script without any issue.
Use this maintained version of the script as the original source on that link had a typo in the while loop:
I've had good luck using Boxcutter to capture full-screen screenshots. Unfortunately, it dumps to BMP or PNG (both of which are rather large), so I found another program called BMP2JPG that converts the file (post-capture) to a JPG. I have that run on a regular interval and (when the interval has elapsed / the number of iterations = max iterations), I zip the directory and upload it to the KServer.
The only disadvantage to this approach is that I won't get the zip file until after all iterations have completed, but it's still better (IMHO) than uploading the JPG after every capture.
Boxcutter: http://keepnote.org/boxcutter/BMP2JPG: http://www.microtom.net/os-management/convert-bmp-to-jpg-command-line-utility
That PowerShell is also intriguing as it's calling native functions within Windows. I'll have to play with that at some point :-)
the powershell script works, I tested it on my machine. All you need to do is write an AP that puts this in a directory, run powershell, run powershell or command to zip the folder, transfer folder out.
flavio.suguimitzu I feel like a dope that I can't run this. I've run a limited number of powershell scripts in the past before without a problem. For testing I've set my execution policy to unrestricted.
I run as admin PS C:\Get-TimedScreenshot -Path c:\temp\ -Interval 30 -EndTime 14:30
It does nothing, no errors and no files written to C:\temp. The documentation says even if the endtime is wrong it should write one screenshot.
I haven't even gotten to the Kaseya scripting part...sigh.
Thanks for ELI5. It worked. Now I'm going to try a simple kaseya agent procedure...wish me luck.
I just did a simple script that worked. I found that executing powershell commands from agent procedures was best done this way.
<Statement name="ExecuteShellCommand" continueOnFail="false">
<Parameter xsi:type="StringParameter" name="Command" value="powershell.exe -ExecutionPolicy Bypass "C:\kworking\ss\ss.ps1""/>
<Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="User"/>
<Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False"/>
Any interest in putting together a better procedure?
If it ain't broken....
Just remember the example code I gave you to insert outside the function brackets will always stop taking snapshots at 22:00 or 10PM.
You can change this according to what you want.