Kill a process on multiple remote machines

前端 未结 2 1962
别跟我提以往
别跟我提以往 2021-01-22 09:53

I am looking as the title says to kill a process (for example name.exe) on multiple remote machines. I can do it individually using pskill or taskkill using (for example): pskil

2条回答
  •  一整个雨季
    2021-01-22 10:06

    If you have a text file with a list of machines you could do it trivially with:

    get-content serverlist.txt | Foreach-object {& pskill -t \\$_ -u -p name.exe}
    

提交回复
热议问题