Answer the question
In order to leave comments, you need to log in
How to open a URL in Powershell and then close the browser?
Good afternoon, when I open a link using Powershell, let’s say the site’s cron opens a unique link, my browser opens as usual and everything is fine, but the browser remains open, so when the script is launched again on the shellduler, it opens another browser, then. their number increases and becomes not Feng Shui.
Is it possible to open a link without launching anything, i.e. can submit a request, or stupidly open through the browser and then after a while kill the browser process with a script?
Answer the question
In order to leave comments, you need to log in
You can't download anything. Everything is accessible via PowerShell
$ie_procinfo = Start-Process iexplore -ArgumentList 'google.com' -passthru
$ie_procid = $ie_procinfo.id #сохраняем id запущеного процесса в переменную
Stop-Process -Id $ie_procid -Force # убиваем запущеный процесс по сохраненному id
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question