optional-typeextensions/system.diagnostics.process.types.ps1xml
<?xml version="1.0" encoding="UTF-8"?>
<!-- Type extensions for process objects from Get-Process. --> <Types> <Type> <Name>System.Diagnostics.Process</Name> <Members> <ScriptProperty> <Name>Runtime</Name> <!-- Some processes don't have a starttime in Windows PowerShell--> <GetScriptBlock> if ($this.StartTime) { New-Timespan -start $this.StartTime -end (Get-Date) } else { $null } </GetScriptBlock> </ScriptProperty> </Members> </Type> </Types> |