A small, hardened PowerShell triage script designed for virtual machines used to test suspicious software. It collects targeted, high‑value indicators after running an installer, EXE, or game — without dumping huge logs or weakening VM security.
This script is ideal for:
- Malware‑analysis VMs
- Suspicious installers
- Unsafe software evaluation
- Hardened VirtualBox / VMware environments
It runs safely using ExecutionPolicy Bypass (per‑run), which does not persist or weaken the VM.
The script gathers only the most relevant forensic indicators:
Processes & Services Running processes (sorted by CPU)
Running services Useful for spotting anything that stays resident after execution.
Startup & Persistence HKCU/HKLM Run keys
Scheduled tasks (filtered to essentials) Helps detect persistence mechanisms.
Network Activity Established TCP connections Shows if the program phoned home.
Hosts File Detects tampering or redirection.
Windows Defender Current protection status
Any threat detections logged during execution
Installed Programs Quick list of newly installed software
All results are saved into a timestamped folder like:
C:\PostRunChecks_20261004_1217\
- Inside your VM, run PowerShell as Administrator and run the script.
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\PostRunCheck.ps1 - Run suspect program.
- Run the script again.
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\PostRunCheck.ps1 - Run a diff between the logs and compare results.
powershell.exe -NoProfile -ExecutionPolicy Bypass -File .\Compare-Triage.ps1 -BaselinePath "C:\PostRunChecks_20261004_1230" -AfterPath "C:\PostRunChecks_20261004_1245"
The script creates a folder containing:
processes.txt
services.txt
startup_hklm.txt
startup_hkcu.txt
schtasks.txt
netstat.txt
hosts.txt
defender_status.txt
defender_detections.txt
installed_programs.txt
These files provide a fast, focused snapshot of system state after running suspicious software.
This script is designed for hardened VMs.
- No Guest Additions
- No shared folders
- No clipboard integration
- No drag‑and‑drop
- No GPU acceleration
- No host integration
- Snapshots enabled
Run suspicious software → run this script → review output → revert snapshot.