Here's how that works:
Like last time, we launched an instance of calculator.exe, found the process ID using Get-Process, then killed it with Stop-Process. PowerShell didn't hesitate to do as we commanded. But for safety's sake, let's add the '-Confirm' switch:
This time we had to take an extra step before the process was stopped. This feature would be useful in, for example, an interactive script designed for newer users, who might not be as comfortable taking permanent or destructive actions.
No comments:
Post a Comment