Hi,
Follow the below blog from Microsoft
https://devblogs.microsoft.com/scripting/use-powershell-to-create-job-that-runs-at-startup/
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi All,
I want to run a PowerShell script when a machine (WVD) boots up.
I have used automation account for multiple things however I am missing the catch here that is "run the code when machine boots up".
Can someone please help me to achieve this.
As always thanks in advance :)
Regards,
Gourav
Hi,
Follow the below blog from Microsoft
https://devblogs.microsoft.com/scripting/use-powershell-to-create-job-that-runs-at-startup/
The classic approach would be to use the Task Scheduler and set a trigger for "At system startup". In the Actions tab set it to run Powershell.exe and in the Arguments field put the full path to the script that you want to run. On the General tab, specify the user that the script will run as, or just use System.