Add 'add_job_to_taskscheduler.ps1'
This commit is contained in:
parent
1848e74ac8
commit
ec321a2699
1 changed files with 5 additions and 0 deletions
5
add_job_to_taskscheduler.ps1
Normal file
5
add_job_to_taskscheduler.ps1
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
$timeInterval = New-JobTrigger -Daily -At "0:30 AM" -DaysInterval 3
|
||||||
|
$scriptPath = "c:\Users\admin\Documents\vmbackup\backup_vm_intranet.ps1"
|
||||||
|
$options = New-ScheduledJobOption -RunElevated
|
||||||
|
|
||||||
|
Register-ScheduledJob -Name BackupVMIntranet -FilePath $scriptPath -ScheduledJobOption $options -Trigger $timeInterval
|
Loading…
Reference in a new issue