The problem is most likely Session 0 isolation . CMD
is running in a user session, while php(or the web server) is running as a service. Services in Windows 7 runs in an isolated session called Session 0
. Processes in this session cannot communicate with other processes.
So you Get-process
command can't list your CMD
-process because it doesn't have access to it. You can verify the isolation by running $process=Get-Process "cmd"
and echoing the results. I've never tried it, but I'm pretty sure you won't find any processes that you run interactively.