New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Extend Process with CommandLine property #3322
Comments
|
Yes, please. This would be really useful to have! |
|
For a quick and easy Windows only solution, after running: Install-Module NtObjectManagerAdd the following to your profile to get CommandLine and ParentProcessId: Update-TypeData -TypeName System.Diagnostics.Process -MemberType ScriptProperty -MemberName CommandLine -Value {
(Get-NtProcess -ProcessId $this.Id).CommandLine
}
Update-TypeData -TypeName System.Diagnostics.Process -MemberType ScriptProperty -MemberName ParentProcessId -Value {
(Get-NtProcess -ProcessId $this.Id).ParentProcessId
}This way is much faster than using CIM. |
|
Sweet find!! Thanks. |
|
Ah, man ... be still my beating heart: |
|
no update from ms? |
|
Fixed for Windows and Linux. |
|
Handy links: |
powercode commentedMar 13, 2017
Add a CodeMethod to extend System.Diagnostics.Process with CommandLine to be able to see how a process was started.
The text was updated successfully, but these errors were encountered: