Ask your PowerShell-related questions, including questions on cmdlet development!
Forum rules Do not post any licensing information in this forum.
Any code longer than three lines should be added as code using the 'Select Code' dropdown menu or attached as a file.
This topic is 7 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.
I would like to add a loop in this script to close a specific process until the process appear. I saw that the command to kill a process should be "Stop-Process -processname process" but I don't know about the loop and how to integrate it to my script ?
(I meant, after my file has been executed another process will be opened and I want to kill it when it appears. So I'm thinking about a loop in my script to kill the process as soon as it appears)
It just close the process when the process is already active but do nothing if the process is not opened yet. Also it download and execute nothing too.
I tried to write the script on a line too, I get an error.
This topic is 7 years and 9 months old and has exceeded the time allowed for comments. Please begin a new topic or use the search feature to find a similar but newer topic.