Skip to content

Option to run various shells as Administrator #5

Open
@alexandruboboc

Description

Hi. Love your plugin, thanks for offering it for free.

I am wondering, how could I run PowerShell as Administrator inside VSC?

From windows cmd, I can do this:
powershell -Command "Start-Process PowerShell -Verb RunAs"

or I can run this when in PowerShell:
Start-Process PowerShell -Verb RunAs.

and both sollutions give me a new PowerShell window as Administrator.

So I gave this a go:

        {
            "shell": "C:\\Windows\\sysnative\\WindowsPowerShell\\v1.0\\powershell.exe",
            "args": ["Start-Process PowerShell -Verb RunAs"],
            "label": "PowerShell (Administrator)"
        }

And it starts a PowerShell terminal as Administrator, but in a new window outside of VSC.

Any suggestions?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions