windowsProcessProbeScript function

String windowsProcessProbeScript(
  1. int pid
)

PowerShell probe invoked with a validated numeric PID.

CIM supplies process CreationDate and LastBootUpTime; the MachineGuid registry value scopes those times to this Windows installation. The script emits a single machine-readable line and exits unsuccessfully if any identity source cannot be read.

Implementation

String windowsProcessProbeScript(int pid) {
  if (pid <= 0) throw ArgumentError.value(pid, 'pid', 'Must be positive');
  return _windowsProcessProbeTemplate.replaceFirst('__PID__', '$pid');
}