windowspowershellstartupadmin-rights

Run Powershell command on Windows 10 startup with admin rights


I want to achieve the following:

When I start my computer I want powershell to run command "Restart-NetAdapter". It requires admin right to work.

I have tried putting .ps1 script to startup folder and trying to do cmd commands to invoke powershell scripts, but it didn't work. Any help with this?

If you need more info please ask.

Best regards, M.


Solution

  • You could use task scheduler, setup trigger startup and for admin rights you can select in the security option under what user account you want the command to run.