In powershell, is there a difference between:
ps theProcessName* | kill
and
kill -processname theProcessName*
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
In the first example, you are using the PowerShell pipeline to pipe
System.Diagnostics.Processobjects (fromGet-Process) into theStop-Processcmdlet.In the second example, you and directly calling the
Stop-Processcmdlet, and are using a named parameter to pass in the string to match against process names.