hello, i have a script which needs to be set to run as admin, i have the below script to do so.
Start-Process PowerShell -verb runas -ArgumentList '-noexit','-File','c:\pathtoscript.ps1'
However my question is if i am logged into my machine with an account that does not have the correct rights to execute the above script... is there a way i can call on a script using different credentials and running it as admin?
so if my normal username is abcd and my admin username is efgh, however can i run the script as efgh from my abcd account, also opening it elevated?
Many Thanks