CmdID / PowerShell / Cmdlets / Get
Get-JobTrigger
Gets the job triggers of scheduled jobs. PowerShell reference
From the PowerShell reference 4 parameters
What it does
Gets the job triggers of scheduled jobs. The Get-JobTrigger cmdlet gets the job triggers of scheduled jobs. You can use this command to examine the job triggers or to pipe the job triggers to other cmdlets. A job trigger defines a recurring schedule or conditions for starting a scheduled job. Job triggers are not saved to disk independently; they are part of a scheduled job. To get a job trigger, specify the scheduled job that the trigger starts. Use the parameters of the Get-JobTrigger cmdlet to identify the scheduled jobs. You can identify the scheduled jobs by their names or identification numbers, or by entering or piping ScheduledJob objects, such as those that are returned by the Get-ScheduledJob cmdlet, to Get-JobTrigger. Get-JobTrigger 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.
Get-JobTrigger [[-TriggerId] <Int32[]>] [-InputObject] <ScheduledJobDefinition> [<CommonParameters>]Get-JobTrigger [[-TriggerId] <Int32[]>] [-Id] <Int32> [<CommonParameters>]Get-JobTrigger [[-TriggerId] <Int32[]>] [-Name] <String> [<CommonParameters>]
Get a job trigger by scheduled job name
Get-JobTrigger -Name "BackupJob"IdentifyGet a job trigger by ID
Get-ScheduledJobIdentifyGet job triggers by piping a job
Get-ScheduledJob -Name Backup, Archive | Get-JobTriggerIdentifyGet the job trigger of a job on a remote computer
Invoke-Command -ComputerName Server01 { Get-ScheduledJob Backup | Get-JobTrigger -TriggerId 2 }IdentifyGet all job triggers
Get-ScheduledJob | Get-JobTrigger |
Format-Table -Property Id, Frequency, At, DaysOfWeek, Enabled, @{Label="ScheduledJob";Expression={$_.JobDefinition.Name}} -AutoSizeIdentifyGet the job trigger property of a scheduled job
(Get-ScheduledJob Test-HelpFiles).JobTriggers
Get-ScheduledJob | foreach {$_.JobTriggers}IdentifyCompare job triggers
Get-ScheduledJob -Name ArchiveProjects | Get-JobTrigger | Tee-Object -Variable t1IdentifyIts page in the reference: Get-JobTrigger.
Parameters
-IdSpecifies the identification number of a scheduled job. Get-JobTrigger gets the job trigger of the specified scheduled job.
To get the identification number of scheduled jobs on the local computer or a remote computer, use the Get-ScheduledJob cmdlet.-InputObjectSpecifies a scheduled job. Enter a variable that contains ScheduledJob objects or type a command or expression that gets ScheduledJob objects, such as a Get-ScheduledJob command. You can also pipe ScheduledJob objects to Get-JobTrigger.-NameSpecifies the name of a scheduled job. Get-JobTrigger gets the job trigger of the specified scheduled job. Wildcards are supported.
To get the names of scheduled jobs on the local computer or a remote computer, use the
Get-ScheduledJob cmdlet.-TriggerIdGets the specified job triggers. Enter the trigger IDs of one or more job triggers of a scheduled job. Use this parameter when the scheduled job that is specified by the Name, Id, or InputObject parameters has multiple job triggers.