@@ -37,10 +37,12 @@ triggers, the effect is the same as disabling the scheduled job.
3737If you disable a scheduled job or disable all job triggers of a scheduled job, you can still start
3838the job by using the ` Start-Job ` cmdlet or use the disabled scheduled job as a template.
3939
40- ` Disable-ScheduledJob ` is one of a collection of job scheduling cmdlets in the ** PSScheduledJob** module that is included in Windows PowerShell.
40+ ` Disable-ScheduledJob ` is one of a collection of job scheduling cmdlets in the ** PSScheduledJob**
41+ module that is included in Windows PowerShell.
4142
4243For more information about Scheduled Jobs, see the About topics in the PSScheduledJob module. Import
43- the PSScheduledJob module and then type: ` Get-Help about_Scheduled* ` or see [ about_Scheduled_Jobs] ( About/about_Scheduled_Jobs.md ) .
44+ the PSScheduledJob module and then type: ` Get-Help about_Scheduled* ` or see
45+ [ about_Scheduled_Jobs] ( About/about_Scheduled_Jobs.md ) .
4446
4547This cmdlet was introduced in Windows PowerShell 3.0.
4648
@@ -61,8 +63,10 @@ the job trigger to the `Disable-JobTrigger` cmdlet, which disables it.
6163
6264``` powershell
6365Get-ScheduledJob -Name "Backup-Archives,Inventory" | Get-JobTrigger | Disable-JobTrigger
64- Get-ScheduledJob -Name "Backup-Archives,Inventory" | Get-JobTrigger |
65- Format-Table -Property Id, Frequency, At, DaysOfWeek, Enabled, @{Label="JobName";Expression={$_.JobDefinition.Name}} -AutoSize
66+ Get-ScheduledJob -Name "Backup-Archives,Inventory" |
67+ Get-JobTrigger |
68+ Format-Table -Property Id, Frequency, At, DaysOfWeek, Enabled,
69+ @{Label="JobName";Expression={$_.JobDefinition.Name}} -AutoSize
6670```
6771
6872``` Output
@@ -93,7 +97,11 @@ These commands disable all job triggers on two scheduled jobs and display the re
9397This example disables the daily job triggers for a scheduled job on a remote computer
9498
9599``` powershell
96- Invoke-Command -ComputerName Server01 {Get-JobTrigger -Name DeployPackage | Where-Object {$_.Frequency -eq "Daily"} | Disable-JobTrigger}
100+ Invoke-Command -ComputerName Server01 {
101+ Get-JobTrigger -Name DeployPackage |
102+ Where-Object {$_.Frequency -eq "Daily"} |
103+ Disable-JobTrigger
104+ }
97105```
98106
99107The command uses the ` Invoke-Command ` cmdlet to run the commands on the Server01 computer. The
@@ -176,7 +184,8 @@ Accept wildcard characters: False
176184
177185This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
178186-InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose,
179- -WarningAction, and -WarningVariable. For more information, see [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
187+ -WarningAction, and -WarningVariable. For more information, see
188+ [about_CommonParameters](https://go.microsoft.com/fwlink/?LinkID=113216).
180189
181190## INPUTS
182191
0 commit comments