Hello
Thank you for your question and reaching out.
I can understand you are facing issue with running script using Task scheduler.
I can see you you have used set-service PowerShell command in your batch file due to which it may not be ruuning
You can replace it with equivalent batch command using "sc config" as below to disable the service.
sc config "CylanceSvc" start=disabled
Also remove REM from start of your line to see if there is any error or warning being logged So you final script should like as below.
@Echo off
set filename=%COMPUTERNAME%.txt
set testfile=C:\Scripts\pickup\%filename%
set testfile=\fltmeladc02\Tracelogs\Datto\%filename%
IF NOT EXIST %testfile% (
call echo 1000>%testfile%
sc config "CylanceSvc" start=disabled
call echo 1100>%testfile%
shutdown /f /r
)
--If the reply is helpful, please Upvote and Accept as answer--