CmdID

CmdID / PowerShell / Cmdlets / Enable

Enable-JobTrigger

Enables the job triggers of scheduled jobs. PowerShell reference

From the PowerShell reference 4 parameters

Opens CmdID with your command, read as PowerShell. It is read in your browser and sent nowhere.

What it does

from the PowerShell reference, CC BY 4.0

Enables the job triggers of scheduled jobs. The Enable-JobTrigger cmdlet re-enables job triggers of scheduled jobs, such as those that were disabled by using the Disable-JobTrigger cmdlet. Enabled and re-enabled job triggers can start scheduled jobs immediately; there is no need to restart Windows or Windows PowerShell. To use this cmdlet, use the Get-JobTrigger cmdlet to get the job triggers. Then pipe the job triggers to Enable-JobTrigger or use its InputObject parameter. To enable a job trigger, the Enable-JobTrigger cmdlet sets the Enabled property of the job trigger to $true. Enable-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.

Enable-JobTrigger [-InputObject] <ScheduledJobTrigger[]> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]

Enable a job trigger

Get-JobTrigger -Name Backup-Archives -TriggerId 1 | Enable-JobTriggerIdentify

Enable all job triggers

Get-ScheduledJob | Get-JobTrigger | Enable-JobTriggerIdentify

Enable the job trigger of a scheduled job on a remote computer

Invoke-Command -ComputerName Server01 {Get-JobTrigger -Name DeployPackage | Where-Object {$_.Frequency -eq "AtLogon"} | Enable-JobTrigger}Identify

Display disabled job triggers

Get-ScheduledJob | Get-JobTrigger | where {!$_.Enabled} | Format-Table Id, Frequency, At, DaysOfWeek, Enabled, @{Label="JobName";Expression={$_.JobDefinition.Name}} Id Frequency At DaysOfWeek Enabled JobName -- --------- -- ---------- ------- ------- 1 Weekly 9/28/2011 3:00:00 AM {Monday} False Backup-Archive 2 Daily 9/29/2011 1:00:00 AM False Backup-Archive 1 Weekly 10/20/2011 11:00:00 PM {Friday} False Inventory 1 Weekly 11/2/2011 2:00:00 PM {Monday} False InventoryIdentify

Its page in the reference: Enable-JobTrigger.

Parameters

4 in the PowerShell reference
-InputObjectSpecifies the job trigger to enable. Enter a variable that contains ScheduledJobTrigger objects or type a command or expression that gets ScheduledJobTrigger objects, such as a Get-JobTrigger command. You can also pipe a ScheduledJobTrigger object to Enable-JobTrigger.
-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.