Fixing a bug where powershell has no parent process