Page History
Table of Contents |
---|
...
Introduction
- Windows Task Scheduler® jobs can be migrated to JS7.
- SOS provides a PowerShell script that which creates JS7 workflows, calendars and schedules from Windows Task Scheduler® jobs.
...
- The converted objects are added to a .zip archive for import into JS7, see the JS7 - Inventory Export and Import article.
Download
- Download the PowerShell cmdlet (verify signed scripts): ConvertFrom-WindowsTaskScheduler.ps1
- The PowerShell cmdlet can be used with Windows PowerShell FullCLR 5.1 and PowerShell CoreCLR 6.x and 7.x for Windows environments. It can be used for JS7 releases 2.x.
PowerShell Cmdlet
Name
ConvertFrom-WindowsTaskScheduler
...
The job configuration from Windows Task Scheduler® is converted to JSON files which can be imported and deployed to JS7.
This includes to create creating a workflow JSON file and a schedule JSON file per converted job. JSON file names are created from the Windows Task Scheduler® task names.
The cmdlet adds JSON files to a .zip archive which can be imported to into JS7.
PARAMETERS
AgentName
-AgentName <String>
...
Required? | false |
Position? | 4 |
Default value | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
ArchivePath
-ArchivePath <String>
Specifies the name of the .zip archive that holds the converted jobs and which is used for import into JS7.
By default the .zip archive is created in the current directory with the name js7-import.zip.
Required? | false |
Position? | 5 |
Default value | js7-import.zip |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
CalendarName
-CalendarName <String>
Specifies the name of a common calendar for converted jobs in the JS7 inventory. All converted jobs use the same calendar.
If the directory is not specified then a temporary directory is created and is removed after conversion of jobsBy default a calendar with the name "Everyday" is created.
Required? | false |
Position? | 56 |
Default value | EveryDayEveryday |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
...
Accepts the name of a Joda time zone, see http://joda-time.sourceforge.net/timezones.html
The specified time zone is added to the run-time settings of jobs. Consider Note that JS7 might be operated in a time zone which is different from the time zone that the Windows Task Scheduler® is operated forin.
For PowerShell FullCLR 5.1 the computer's time zone is used, for later PowerShell versions the UTC time zone is used by default.
Required? | false |
Position? | 67 |
Default value | (&{ if ( $PSVersionTable.PSVersion.Major -le 5 ) { [Windows.Globalization.Calendar,Windows.Globalization,ContentType=WindowsRuntime]::New().GetTimeZone() } else { 'Etc/UTC' } }) |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
...