PowerShell Logo Small

Stop-ScheduledTask



This is the built-in help made by Microsoft for the command 'Stop-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

Stops all running instances of a task.

SYNTAX


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



Search powershellhelp.space

DESCRIPTION


The Stop-ScheduledTask cmdlet immediately stops all running instances of a registered background task. Upon success, the cmdlet returns a registered scheduled task object.



<

RELATED LINKS

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

REMARKS

<

Examples


Example 1: Stop a scheduled task

PS C:\> Stop-ScheduledTask -TaskName "ScanSoftware"



This command stops all instances of a task named ScanSoftware in the root folder.




Example 2: Stop all instances of all tasks in a folder

PS C:\>Get-ScheduledTask -TaskPath "\UpdateTasks\" | Stop-ScheduledTask



This command uses the Get-ScheduledTask cmdlet to get all scheduled tasks in the UpdateTasks folder. The command pipes this information to the Stop-ScheduledTasks cmdlet,
which stops all running instances of these scheduled tasks.