Your location:Tech News>OS>Windows 10 FAQ>Win10 Tips: Add an administrator permission option to the right click menu of PS1 files

Latest News

Win10 Tips: Add an administrator permission option to the right click menu of PS1 files

Author:fsadmin

Views:

Many professional users like to use PowerShell. The file format of this tool is .ps1. In many cases PowerShell files require administrator privileges to solve system problems such as Win10 application problems so it is very practical to add the option to run as administrator to its right-click menu. The editor of Pepsi.com will tell you how to add this option today.

The registration form is used. Although the following steps may seem a bit more but it is not troublesome as follows:

1. After entering regedit in the Cortana search bar press Enter to enter the registry editor

2. Navigate to

HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1shell

3. Create a new item and name it runas as shown below

4 Create a new string value and name it HasLUAShield. The numerical data does not need to be modified and remains empty as shown in the figure below

5. Create a new item under runas and name it command as shown in the figure below

p>

6. Double-click (default) and modify its numerical data as follows:

powershell.exe -Command if((Get-ExecutionPolicy) -ne AllSigned) {Set -ExecutionPolicy -Scope Process Bypass }; %1

After clicking OK right-click on any .ps1 file and you will see the option to run as an administrator. If you want to restore the default just delete the above key value. In order to facilitate you to add this function IT House has packaged and uploaded the above-mentioned registry content and users who need it can download and use it.

Registration file download: click here to enter the network disk

?Win10 Tips: Use the 'Photo' application to edit videos and add special effects

Recommend article

Relate article