Created
September 6, 2017 19:58
-
-
Save deruke/1963b82d6b13bd6a87afec19bb818b59 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if not exist "C:\windows\sysmon_config.xml" ( | |
copy /z /y "\\lab.local\SYSVOL\lab.local\scripts\sysmon\sysmon_config.xml" "C:\windows\" | |
) | |
sc query "Sysmon" | Find "RUNNING" | |
If "%ERRORLEVEL%" EQU "1" ( | |
goto startsysmon | |
) | |
:startsysmon | |
net start Sysmon | |
If "%ERRORLEVEL%" EQU "1" ( | |
goto installsysmon | |
) | |
:installsysmon | |
"\\lab.local\SYSVOL\lab.local\scripts\sysmon\sysmon64.exe" /accepteula -i c:\windows\sysmon_config.xml |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment