Invoking powershell in administrator mode

Hello, I’m trying to invoke powershell command but it will only work in administrator mode, any way to do that?

If you call a script rather than a command I believe that you can add the first line which will elevate privileges to administrator…

Try this link for starters …

https://stackoverflow.com/questions/7690994/powershell-running-a-command-as-administrator

1 Like

Can you elaborate on this? I am trying to find a solution for this case as to how to run a script in powershell as an admin without the credentials windows popping up.
I have tried this script -
Start-Process powershell -Verb runAs
But running this pops up the credentials window

Hi @Sunny_J ,

Did you have view on the below thread it is having steps to run the powershell in admin mode and also have steps to avoid the credential popup. please try the suggestion from the below thread and let us know. thanks.