Create the files Using notepad on a desktop PC create the file "MyScript1.ps1" and put the following in it: # Store the date and time every startup $logFile = 'C:\MyStartupLog.txt' get-date >> $logFile Now using notepad create the file "MyStartup.bat" and put the following in it: powershell -command "C:\MyScript1.ps1" Move the files to the Windows […]
Powershell commands View the current list of scheduled tasks schtasks.exe Help For a full list of supported parameters schtasks.exe /? Create a new scheduled task schtasks /Create /? schtasks /Create /SC ONSTART /TN MyTaskName /TR "some command to exectute or path to a batchfile" Run as Administrator: schtasks /Create /SC ONSTART /TN MyTaskName /TR "some […]
Running scripts and tasks at boot This command file is invoked every time the system boots: "OEMCustomization.cmd"