to start and stop the Calc process and then detects processes that have stopped
PS> calc <---- start the Calc process
PS> $p = get-process calc <---- get an object and store it
PS> stop-process -inputobject $p <----- stop the Calc process
PS> get-process | where-object {$_.HasExited}
` HasExited ` is a property of process object. Because the Calc process has been stopped, the value of HasExited property is TRUE, so there is no output.
Monday, January 19, 2009
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment