CmdID / PowerShell / Cmdlets / Enable
Enable-ScheduledJob
Enables a scheduled job. PowerShell reference
From the PowerShell reference 6 parameters
What it does
Enables a scheduled job. The Enable-ScheduledJob cmdlet re-enables scheduled jobs that are disabled, such as those that are disabled by using the Disable-ScheduledJob cmdlet. Enabled jobs run automatically when triggered. To enable a scheduled job, the Enable-ScheduledJob cmdlet sets the Enabled property of the scheduled job to $true. Enabled-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-ScheduledJob [-InputObject] <ScheduledJobDefinition> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]Enable-ScheduledJob [-Id] <Int32> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]Enable-ScheduledJob [-Name] <String> [-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
Enable a scheduled job
Enable-ScheduledJob -Id 2 -PassThruIdentifyEnable all scheduled jobs
Get-ScheduledJob | Enable-ScheduledJobIdentifyEnable selected scheduled jobs
Get-ScheduledJob | Get-ScheduledJobOption | Where-Object {$_.RunWithoutNetwork} |
ForEach-Object {Enable-ScheduledJob -InputObject $_.JobDefinition}IdentifyEnable scheduled jobs on a remote computer
Invoke-Command -ComputerName "Srv01,Srv10" -ScriptBlock {Enable-ScheduledJob -Name "Inventory"}IdentifyIts page in the reference: Enable-ScheduledJob.
Parameters
-IdEnables the scheduled job with the specified identification number (ID). Enter the ID of a scheduled job.-InputObjectSpecifies the scheduled job to enable. 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
Enable-ScheduledJob.-NameEnables 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.