The following code does what I need it do by processing each command and waiting. However, I cannot seem to figure out how to get all of that output into the log file. Right now it only logs date and time. I need to log all output in the cmd, including any errors, to a log file. I would appreciate all help with this.
echo Logged time = %time% %date%>> TaskSetBatchScripts.log
@echo off
echo %time%
schtasks /Change /disable /TN \Microsoft\Windows\Shell\FamilySafetyMonitor
timeout 5 > NUL
echo %time%
schtasks /Change /disable /TN \Microsoft\Windows\Shell\FamilySafetyMonitorToastTask
timeout 5 > NUL
echo %time%
schtasks /Change /disable /TN \Microsoft\Windows\Shell\FamilySafetyRefreshTask
timeout 5 > NUL
echo %time%
schtasks /Change /disable /TN "\Microsoft\Windows\Power Efficiency Diagnostics\AnalyzeSystem"
timeout 5 > NUL
echo %time%
schtasks /Change /disable /TN \Microsoft\Windows\Maps\MapsToastTask
timeout 5 > NUL
echo %time%
schtasks /Change /disable /TN \Microsoft\Windows\Maps\MapsUpdateTask
timeout 5 > NUL
echo %time%
schtasks /Change /disable /TN "\Microsoft\Windows\Mobile Broadband Accounts\MNO Metadata Parser"
timeout 5 > NUL
echo %time%
schtasks /Change /disable /TN "\Microsoft\Windows\Windows Error Reporting\QueueReporting"
timeout 5 > NUL
echo %time%
schtasks /Change /disable/TN \Microsoft\Windows\Defrag\ScheduledDefrag
timeout 5 > NUL
echo %time%
schtasks /Change /disable /TN "Microsoft\Windows\Windows Media Sharing\UpdateLibrary"
timeout 5 > NUL
echo %time%
schtasks /Change /disable /TN Microsoft\Windows\Maintenance\WinSAT
timeout 5 > NUL
echo %time%