This is useful when you want to run any automation created using PowerShell on Windows Startup. To run PowerShell script on startup.
Create a Windows Command Script (.cmd file) i.e. create a file and save it with
Write the below command in .cmd file.
powerShell path\to\powershell_script.ps1 >> “path\to\log_file.log”
If you want to run the script in background. Add
-windowstyle hidden after powershell.
Place the file or its shortcut file at below path.
Restart the computer and you can track its execution in log file.
You must be logged in to post a comment.