Saturday, April 13, 2013

Creating batch file for Scheduled Task Count


Creating batch file for Scheduled Task Count

@echo off
title Scheduled Task Count
setlocal enabledelayedexpansion

schtasks /query /fo table

echo.
set /a count = 0
for /f %%i in ('schtasks /query /fo table /nh') do (
set /a count = !count! + 1
)

echo Total Tasks Count : !count!
set /p=

No comments:

Post a Comment