A simple screenlogger script written in Windows PowerShell and .NET.
PowerShell Screenlogger is a simple screenlogger script made for understanding PowerShell - .NET interaction, protecting your systems from misuse and expanding your blue team skills.
The script uses System.Windows.Drawing from .NET to take screenshots. The user can select the path they want to save the logs by changing $folderPath in the script. The default folder is %userprofile%\Desktop\Logs.
You can set the amount of screenshots you want to take by changing 50 at the loop -> while ($sessionCount -le 50). Change the value to take less or more screenshots. You can change the loop to something like while ($sessionCount -ge -1) to take screenshots forever until the script is closed.
You can set the delay between screenshots by changing Start-Sleep -Seconds 1 to something else.
The script adds date and time to the top left corner of the screenshots, so you can easily understand the time of the screenshot.
The project also comes with a program called as WatchLogs. This tool is written in C# and it is used to easily watch the logs.
With WatchLogs, you can select the folder that contains the logs and watch them until the end. You can click Set Interval to change the speed of the playback. Default is 1000 milliseconds (1 second). You can also click Clear Logs to erase all screenshots inside the logs folder.