CmdID / PowerShell / Cmdlets / Disable
Disable-ScheduledJob
Disables a scheduled job. PowerShell reference
From the PowerShell reference 6 parameters
What it does
Disables a scheduled job. The Disable-ScheduledJob cmdlet temporarily disables scheduled jobs. Disabling preserves all job properties and does not disable the job triggers, but it prevents the scheduled jobs from starting automatically when triggered. You can start a disabled scheduled job by using the Start-Job cmdlet or use a disabled scheduled job as a template. To disable a scheduled job, the Disable-ScheduledJob cmdlet sets the Enabled property of the scheduled job to False. To re-enable the scheduled job, use the Enable-ScheduledJob cmdlet. Disable-ScheduledJob is one of a collection of job scheduling cmdlets in the PSScheduledJob module that is included in Windows PowerShell. For more information about Scheduled Jobs, see the About topics in the PSScheduledJob module. Import the PSScheduledJob module and then type: Get-Help about_Scheduled* or see about_Scheduled_Jobs. This cmdlet was introduced in Windows PowerShell 3.0.
Disable-ScheduledJob [-InputObject] <ScheduledJobDefinition> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]Disable-ScheduledJob [-Id] <Int32> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]Disable-ScheduledJob [-Name] <String> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
Disable a scheduled job
Disable-ScheduledJob -Id 2 -PassThruIdentifyDisable all scheduled jobs
Get-ScheduledJob | Disable-ScheduledJob -PassThruIdentifyDisable selected scheduled jobs
Get-ScheduledJob | Where-Object {!$_.Credential} | Disable-ScheduledJobIdentifyDisable scheduled jobs on a remote computer
Invoke-Command -ComputerName Srv01, Srv10 -ScriptBlock {Disable-ScheduledJob -Name TestJob}IdentifyDisable a scheduled job by its global ID
Get-ScheduledJob | Format-Table -Property Name, GlobalId, Command -AutoSizeIdentifyIts page in the reference: Disable-ScheduledJob.
Parameters
-IdDisables the scheduled job with the specified identification number (ID). Enter the ID of a scheduled job.-InputObjectSpecifies the scheduled job to be disabled. Enter a variable that contains ScheduledJobDefinition objects or type a command or expression that gets ScheduledJobDefinition objects, such as a Get-ScheduledJob command. You can also pipe a ScheduledJobDefinition object to Disable-ScheduledJob.-NameDisables the scheduled jobs with the specified names. Enter the name of a scheduled job. Wildcards are supported.-PassThruReturns an object representing the item with which you are working. By default, this cmdlet does not generate any output.-ConfirmPrompts you for confirmation before running the cmdlet.-WhatIfShows what would happen if the cmdlet runs. The cmdlet is not run.