Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR SHELL

run powershell script at startup

Creat a cmd script (e.g. script.cmd)

Enter this into the cmd script:
powershell -ExecutionPolicy Bypass -Command "C:path	oscriptscript.ps1"

If you want the script to be hidden add this attribute to the powershell call:
-windowstyle hidden

After this, add the cmd script to the startup folder.
The startup folder can be located by pressing win key + R and type in:
shell:startup

DISCLAMER: 
Not tested in VM machines, only tested by manual logging into an admin account.
 
PREVIOUS NEXT
Tagged: #run #powershell #script #startup
ADD COMMENT
Topic
Name
5+6 =