Programmatically Run CMD as an elevated administrator

Here is the code in order to elevate a CMD window as an Administrator by using powershell.

Open up PowerShell and run the following

Start-Process cmd -Verb runAs

If you see the “Administrator:” designation in the CMD title bar you are now an elevated administrator.

Leave a reply:

Your email address will not be published.

Site Footer