Date: Thu, 28 Mar 2024 23:55:49 +0000 (UTC) Message-ID: <1621928068.12137.1711670149329@change.sos-berlin.com> Subject: Exported From Confluence MIME-Version: 1.0 Content-Type: multipart/related; boundary="----=_Part_12136_1031495642.1711670149329" ------=_Part_12136_1031495642.1711670149329 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Location: file:///C:/exported.html
ConvertFrom-WindowsTaskScheduler
Converts jobs from Windows Task Scheduler to JobScheduler.
ConvertFrom-WindowsTaskScheduler [[-TaskName] <String>] [[-T=
askPath] <String>] [[-OutputDirectory] <String>] [[-Timezo=
ne] <String>] [<CommonParameters>]
The job configuration from Windows Task Scheduler is converted to XML jo= b files that can be deployed to JobScheduler Master.
The cmdlet writes XML job files to an output directory. You can copy suc= h files to the JobScheduler Master's ./config/live folder to deploy yo= ur jobs.
XML job file names are created from the Windows Task Scheduler folder pa= ths and task names.
-TaskName <String>
Specifies an individual job to be converted. Consider that job names are= not unique with Windows Task Scheduler. When used with the -TaskPath = parameter then a single job can be selected.
Without this parameter all jobs are converted.
Required? | false |
Position? | 1 |
Default value | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
-TaskPath <String>
Specifies the path in the Windows Task Scheduler repository from which j= obs should be converted.
Without this parameter jobs from any paths are converted.
Required? | false |
Position? | 2 |
Default value | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
-OutputDirectory <String>
Specifies the output directory for converted jobs.
If the directory does not exist then it will be created. By default the = working directory is used.
Required? | false |
Position? | 3 |
Default value | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
-Timezone <String>
Accepts the name of a Joda time zone, see http=
://joda-time.sourceforge.net/timezones.html
The cmdlet does not convert dates according to this time zone, instead the =
specified time zone is added to the run-time settings of jobs. Conside=
r that a JobScheduler Master might be operated in a time zone
that is different from the time zone that the Windows Task Scheduler is ope=
rated for.
Required? | false |
Position? | 4 |
Default value | |
Accept pipeline input? | true (ByPropertyName) |
Accept wildcard characters? | false |
-------------------------- EXAMPLE 1 --------------------------
PS > ConvertFrom-WindowsTaskScheduler -TaskPath \Microsoft=
\Windows\Defrag\ -TaskName ScheduledDefrag -OutputDirectory C:/tmp/jobs
Converts the job from the specified folder and writes the XML job file t= o the c:/tmp/jobs directory.
-------------------------- EXAMPLE 2 --------------------------
PS > ConvertFrom-WindowsTaskScheduler -TaskPath \ -OutputD=
irectory C:/tmp/jobs
Converts jobs available in the root folder of Windows Task Manager and w= rites the XML job file to the c:/tmp/jobs directory.
-------------------------- EXAMPLE 3 --------------------------
PS > ConvertFrom-WindowsTaskScheduler -TaskName ScheduledD=
efrag -OutputDirectory C:/tmp/jobs
Converts job(s) with the given name from any folder and writes the XML j= ob file(s) to the c:/tmp/jobs directory.
-------------------------- EXAMPLE 4 --------------------------
PS > ConvertFrom-WindowsTaskScheduler -Timezone 'Europe/Lo=
ndon' -OutputDirectory C:/tmp/jobs
Converts all jobs from any folders and writes the XML job files to the c=
:/tmp/jobs directory.
The specified Joda time zone is added to the run-time settings of converted=
jobs.