...
Get-JobSchedulerJobHistory
SYNOPSIS
Returns a number of JobScheduler history items entries for jobs.
SYNTAX
Get-JobSchedulerJobHistory [[-JobDirectory] <String>] [[-JobChain] <String>] [[-DirectoryJob] <String> ] [[-RecursiveMaxHistoryEntries] [-Compact<Int32>] [-WithLog] [[-MaxLastHistoryItems] <Int32>] [<CommonParameters>]
DESCRIPTION
...
offers the same functionality when used with the -WithHistory switch. Therefore the
same functionality applies to both cmdlets.
Job history items entries are returned independently from the fact that the job is present in the JobScheduler Master.
Jobs are selected from a JobScheduler Master
* by the job chain that jobs are used withassigned to
* by an individual job
* by any jobs from a directory and optionally any sub-folders.
PARAMETERS
...
Directory
-Job Directory <String>
Specifies the path and name of a job.
If the name of a job is specified then the -Directory parameter is used to determine the folder.
Otherwise the -Job parameter is assumed to include the full path and name of the job Optionally specifies the folder for which jobs should be returned. The directory is determined
from the root folder, i.e. the "live" directory.
Required? | false |
Position? | 1 |
Default value | / |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
...
Required? | false |
Position? | 2 |
Default value | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
...
Job
-Directory Job <String>
Optionally specifies the folder for which jobs should be returned. The directory is determined
from the root folder, i.e. the "live" directory.
Required? | false |
Position? | 3 |
Default value | / |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
Recursive
-Recursive <SwitchParameter>
Specifies that sub-folders should be looked up if the -Directory parameter is used and no job or job chain is specified Specifies the path and name of a job.
If the name of a job is specified then the -Directory parameter is used to determine the folder.
Otherwise the -Job parameter is assumed to include the full path and name of the job.
Required? | falsetrue |
Position? | named3 |
Default valueFalse | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
...
MaxHistoryEntries
-Compact <SwitchParameter>
Specifies a more compact response with fewer job history attributes. MaxHistoryEntries <Int32>
Specifies the number of entries that are returned from the history. Entries are provided
in descending order starting with the latest history entry.
Default: 1
Required? | false |
Position? | named4 |
Default value | False1 |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
...
Required? | false | ||
Position? | named | ||
Default value | False | ||
Accept pipeline input? | true (ByPropertyName) | Accept wildcard characters? | false |
MaxLastHistoryItems
...
...
Required? | false |
Position? | 4 |
Default value | 1 |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
...
PS > $history = Get-JobSchedulerJobHistory -JobChain /test/globals/job_chain1 -Job /test/globals/job1
Returns the latest job history item for all jobs used with the entry for the specified job that is associated with job chain "job_chain1" from the folder "/test/globals" folder.
-------------------------- EXAMPLE 2 --------------------------
PS > $history = Get-JobSchedulerJobHistory -JobChain /test/globals/job_chain1 -Job /test/globals/job1 -MaxHistoryEntries 5
Returns the latest 5 job history item for the specified job that is associated with job chain "job_chain1entries for job "job1" from the folder "/test/globals" and includes the log output.
-------------------------- EXAMPLE 3 --------------------------
PS > $history = Get-JobSchedulerJobHistory -Job /test/globals/job1 -MaxHistoryEntries -WithLog -MaxLastHistoryItems 5
Returns the latest 5 job history items entries for job "job1" from the folder "/test/globals" and includes the log output.