#!/usr/bin/perl use Win32::OLE; $strComputer = "." ; #connect to WMI print "Connecting to $ARGV[0]\n"; $wmi = Win32::OLE->GetObject("winmgmts://$strComputer/root/cimv2:Win32_PRocess"); if( 0 == $wmi->Create("notepad.exe", undef, undef, $Pid ) ) { print "PID $Pid created\n"; } else { print "Failed.\n"; }