WinRb / winrm-elevated

Runs PowerShell commands as elevated over Windows Remote Management (WinRM) via a scheduled task
Apache License 2.0
27 stars 17 forks source link

Remove old task and add a unique name #31

Closed fwininger closed 4 years ago

fwininger commented 4 years ago

Last week we had a problem with the ESET antivirus which blocked the XML file of winrm tasks located in C:\Windows\System32\Tasks\WinRM_Elevated_Shell.xml.

After resolution of the problem by ESET, the windows task scheduler was in an inconsistent state. It was no longer possible to create WinRM_Elevated_Shell task.

This PR allows to change the name of the winrm tasks to avoid blocking and to delete the tasks at the end of the script.

It is also possible to multi thread with the gem.

fwininger commented 4 years ago

For the history, a link with the ESET issue : https://forum.eset.com/topic/22268-false-positive-xmlrunnerm/

mwrock commented 4 years ago

Nice change. Thanks!