Created
May 30, 2024 13:39
-
-
Save epjuan21/f53718709ae213b954bb66d9a67f8d5d to your computer and use it in GitHub Desktop.
BackUpDbXenco06AM
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$A=New-ScheduledTaskAction -Execute 'C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe' -Argument '-File D:\ScriptsPowerShellProgramados\BackUpDbXenco.ps1' | |
$T=New-ScheduledTaskTrigger -Daily -At 6:00am | |
$U=New-ScheduledTaskPrincipal -UserId "HOSPITAL\Administrador" -LogonType ServiceAccount -RunLevel Highest | |
$S=New-Scheduledtasksettingsset | |
$D=New-ScheduledTask -Action $A -Principal $U -Trigger $T -Settings $S -Description "Copia de Seguridad Base de Datos BETANIA 06:00 AM" | |
Register-ScheduledTask BackUpXenco06AM -InputObject $D |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment