Search
 
SCRIPT & CODE EXAMPLE
 

SHELL

windows run powershell script from task scheduler

$Trigger= New-ScheduledTaskTrigger -At 10:00am –Daily # Specify the trigger settings
$User= "NT AUTHORITYSYSTEM" # Specify the account to run the script
$Action= New-ScheduledTaskAction -Execute "PowerShell.exe" -Argument "C:PSStartupScript.ps1" # Specify what program to run and with its parameters
Register-ScheduledTask -TaskName "MonitorGroupMembership" -Trigger $Trigger -User $User -Action $Action -RunLevel Highest –Force # Specify the name of the task
Comment

powershell task scheduler

when using PS modules, create a task that runs a .bat file that calls PS
Comment

PREVIOUS NEXT
Code Example
Shell :: package github.com/golang-migrate/migrate is not a main package 
Shell :: avro for debian 
Shell :: powershell redirect output to null 
Shell :: git log with date and author info 
Shell :: linux change user shell /bin/false 
Shell :: open cmd in current directory 
Shell :: download powershell 7.2.1 
Shell :: chown 
Shell :: linux maker user sudo 
Shell :: create new users and add them in group in linux 
Shell :: catkin install 
Shell :: npm install web3 vue 
Shell :: git create branch from commit 
Shell :: copy remote ssh key mac 
Shell :: zsh increment variable 
Shell :: Download and install minikube 
Shell :: how to empty text file in unix 
Shell :: linux make file 
Shell :: git clone from url cmd 
Shell :: aws s3 ls wildcard 
Shell :: How do I rename a local Git branch? 
Shell :: bash modify file text 
Shell :: curl omit ssl 
Shell :: how to apply changes in a single file from stash 
Shell :: git check diff between two repositories 
Shell :: git apply diff 
Shell :: how to host angular on github 
Shell :: shell xargs 
Shell :: git Automatic merge failed; fix conflicts and then commit the result 
Shell :: change resolution of a video with terminal 
ADD CONTENT
Topic
Content
Source link
Name
7+3 =