globalscape/powershell/Log-EphemeralPortStats/SetupLogEphemeralPort.bat

4 lines
315 B
Batchfile
Raw Permalink Normal View History

2022-04-27 14:05:07 -05:00
mkdir %windir%\Tools
copy /Y Log-EphemeralPortStats.ps1 %windir%\Tools\Log-EphemeralPortStats.ps1
schtasks /create /F /tn LogEphemeralPorts /sc onstart /tr "powershell.exe %windir%\Tools\Log-EphemeralPortStats.ps1 -OutputFilePath %windir%\Tools\EphemeralPortStats.log" /ru System
schtasks /run /tn LogEphemeralPorts