Advertisement
Guest User

Untitled

a guest
May 23rd, 2018
80
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. get-process
  2. while ($kilthis -ne "x"){
  3. $kilthis = Read-Host -Prompt 'Input the name of the process you would like to kil'
  4. try{Get-Process $kilthis | Stop-Process}
  5. catch [get-process.exception]{Write-host "please enter a valid name"}
  6. finally{}}
  7. break
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement