Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

create scheduled task via powershell scheduled reboot

$action = New-ScheduledTaskAction -Execute 'Powershell.exe' -Argument '-NoProfile -WindowStyle Hidden -command "& {Restart-Computer -Force -wait}"'
$trigger = New-ScheduledTaskTrigger -Daily -At 3am
$principal = New-ScheduledTaskPrincipal -UserID "NT AUTHORITYSYSTEM" -LogonType ServiceAccount -RunLevel Highest
$settings = New-ScheduledTaskSettingsSet -MultipleInstances Parallel
Register-ScheduledTask -TaskName "YourTaskName" -Action $action -Trigger $trigger -Settings $settings -Principal $principal
Comment

PREVIOUS NEXT
Code Example
Shell :: How to clear or delete Terminal history in linux 
Shell :: github add image to readme 
Shell :: ionic social sharing 
Shell :: apt install jack audio 
Shell :: download docker desktop ubuntu 
Shell :: npm install --save-dev @angular/cli@latest 
Shell :: macos clear terminal 
Shell :: cli kill what is listening on port 
Shell :: use local image with minikube 
Shell :: htaccess hide directory listing 
Shell :: remove file directory linux 
Shell :: make nextcloud scan for files 
Shell :: batch delete all files in subfolders of type 
Shell :: xrandr 1366 
Shell :: conflict pull 
Shell :: add ssh keys to github 
Shell :: chmod 400 in powershell 
Shell :: poetry command install mac 
Shell :: list files in git 
Shell :: create new repo 
Shell :: how do I run a container in docker using a dockerfile 
Shell :: search package linux 
Shell :: unarchive tar acrhive 
Shell :: remove git file from folder 
Shell :: copy directory 
Shell :: git convert to crlf 
Shell :: Something is already running on port 3000. Probably: 
Shell :: gh clone 
Shell :: how to go back to last git commit 
Shell :: print grep output in one line 
ADD CONTENT
Topic
Content
Source link
Name
2+2 =