PowerShell Logo Small

Disable-ScheduledTask



This is the built-in help made by Microsoft for the command 'Disable-ScheduledTask', in PowerShell version 5 - as retrieved from Windows version 'Microsoft Windows Server 2012 R2 Standard' PowerShell help files on 2016-06-23.

For PowerShell version 3 and up, where you have Update-Help, this command was run just before creating the web pages from the help files.

SYNOPSIS

Disables a scheduled task.

SYNTAX


Disable-ScheduledTask [-InputObject] <CimInstance> [-AsJob] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [<CommonParameters>]
Disable-ScheduledTask [-TaskName] <String> [[-TaskPath] <String>] [-AsJob] [-CimSession <CimSession[]>] [-ThrottleLimit <Int32>] [<CommonParameters>]



Search powershellhelp.space

DESCRIPTION


The Disable-ScheduledTask cmdlet disables a scheduled task.



<

RELATED LINKS

Online Version: http://go.microsoft.com/fwlink/p/?linkid=287545
Enable-ScheduledTask
Export-ScheduledTask
Get-ScheduledTask
New-ScheduledTask
Register-ScheduledTask
Set-ScheduledTask
Start-ScheduledTask
Stop-ScheduledTask
Unregister-ScheduledTask
Get-ScheduledTaskInfo

REMARKS

<

Examples


Example 1: Disable a scheduled task

PS C:\> Disable-ScheduledTask -TaskName "SystemScan"
TaskPath TaskName State
-------- -------- --------
\ SystemScan Disabled



This command disables the SystemScan task in the root folder.




Example 2: Disable all scheduled tasks in a folder

PS C:\> Get-ScheduledTask -TaskPath "\UpdateTasks\" | Disable-ScheduledTask
TaskPath TaskName State
-------- -------- --------
\UpdateTasks\ UpdateApps Disabled
\UpdateTasks\ UpdateDrivers Disabled



This command uses the Get-Scheduledtask cmdlet to get all scheduled tasks in the \UpdateTasks\ folder. The command pipes this information to the Disable-ScheduledTasks
cmdlet, which disables these scheduled tasks.