Home  >  Article  >  How to run PowerShell as an administrator in Win10.

How to run PowerShell as an administrator in Win10.

WBOY
WBOYforward
2023-07-18 14:05:422720browse

WindowsPowerShell is a command line shell designed for system administrators and used in Windows operating systems. Windows PowerShell can be used as an interactive prompt and scripting environment, independently or in combination. However, many PowerShell commands require elevated or administrator rights, and you need to launch a PowerShell prompt to execute them.

How to run PowerShell as an administrator in Win10.

#How to run PowerShell as an administrator in Win10.

Method 1: Use the Windows 10 Start Menu context menu.

When you right-click on the Windows 10 Start menu, a context menu appears, allowing you to quickly launch commonly used management programs.

The context menu contains an option called WindowsPowerShell(Admin) as shown below.

How to run PowerShell as an administrator in Win10.

To launch the upgrade PowerShell prompt, click the Windows PowerShell (Administrator) option.

Windows 10 will now display a UAC prompt asking you if you have permission to grant program improvements. Click Yes at this prompt.

How to run PowerShell as an administrator in Win10.

The PowerShell prompt will now open. Since the starting directory will be C:\Windows\System32, the window title will be Administrator: WindowsPowerShell.

How to run PowerShell as an administrator in Win10.

Once you are done with the prompt, you can click the X or type exit and press Enter to close it.

Method 2: Start PowerShell from an elevated command prompt.

If you have an elevated command prompt open, you can simply enter powershellEnter to start powershell.

How to run PowerShell as an administrator in Win10.

When launched this way, the PowerShell prompt looks a little different because the background is not blue and it runs as a shell in a traditional command prompt.

You can type exit and press Enter to return to an elevated command prompt.

The above is the detailed content of How to run PowerShell as an administrator in Win10.. For more information, please follow other related articles on the PHP Chinese website!

Statement:
This article is reproduced at:windows7en.com. If there is any infringement, please contact admin@php.cn delete