PowerShell Create a scheduledjob with Powershell to restart a computer

Create a scheduledjob with Powershell to restart a computer

Create a scheduledjob with Powershell to restart a computer

Register-ScheduledJob -name RestartComputer -ScriptBlock {Restart-Computer -ComputerName localhost -Force} -Trigger (New-JobTrigger -at "3:05pm" -Once) -ScheduledJobOption (New-ScheduledJobOption -RunElevated -WakeToRun) -Credential (Get-Credential)

Leave a Reply

Din e-postadress kommer inte publiceras. Obligatoriska fält är märkta *

Related Post