psgetsystem getsystem via parent process using ps1 and embeded c# PS> . .\psgetsys.ps1 PS> [MyProcess]::CreateProcessFromParent(<system_pid>,<command_to_execute>)