Test-ScheduledTask

Tests if a scheduled task exists on the current computer.

Syntax

Test-ScheduledTask [[-Name] <String>] [<CommonParameters>]

Description

The Test-ScheduledTask function uses schtasks.exe to tests if a task with a given name exists on the current computer. If it does, $true is returned. Otherwise, $false is returned. This name must be the full task name, i.e. the task's path/location and its name.

Related Commands

Parameters

Name Type Description Required? Pipeline Input Default Value
Name String

The name of the scheduled task to check. This must be the full task name, i.e. the task's path/location and its name.

false false

Return Values

System.Boolean.

EXAMPLE 1

Test-ScheduledTask -Name 'AutoUpdateMyApp'

Demonstrates how to test if a scheduled tasks exists.