Win10技巧:为PS1文件右键菜单添加管理员权限
时间:2023-10-24 19:53:32
很多专业用户都喜欢使用PowerShell,这款工具的文件格式为“.ps1”。由于很多情况下PowerShell文件都需要管理员权限才能搞定系统问题,如Win10应用问题,因此如果能够为其右键菜单添加“以管理员身份运行”选项就显得十分实用。系统部落小编今天就告诉大家如何添加该选项。
就是用注册表。虽然下文步骤可能看起来多点,但并不麻烦,具体如下:
1、在Cortana搜索栏输入regedit后,按回车键进入注册表编辑器
2、定位到:HKEY_CLASSES_ROOTMicrosoft.PowerShellScript.1shell
3、新建项,命名为 runas,如下图 ——
4、新建字符串值,命名为 HasLUAShield,数值数据无需修改,保持为空,如下图 ——
5、在runas下新建项,命名为 command,如下图 ——
6、双击“(默认)”,修改其数值数据如下:
powershell.exe "-Command" "if((Get-ExecutionPolicy ) -ne 'AllSigned') { Set-ExecutionPolicy -Scope Process Bypass }; & '%1'"
点击“确定”后,在任意“.ps1”文件上点右键,就会看到“以管理员身份运行”的选项了,若想恢复默认,只需删除上述键值即可。
标签:Win10,PS1文件,右键菜单,管理员权限
![](/images/zang.png)
![](/images/jiucuo.png)
猜你喜欢
彩视APP怎么删除作品?彩视APP删除作品的方法
2023-01-19 12:09:21
![](https://img.aspxhome.com/file/2023/8/a335062_0s.jpg)
苹果新的M1芯片改变了游戏规则:您需要知道的一切
2023-05-18 08:56:13
![](https://img.aspxhome.com/file/2023/8/a209098_0s.png)
电脑版腾讯视频怎么设置不跳过片头片尾?
2022-12-23 07:14:26
![](https://img.aspxhome.com/file/2023/9/a341677_0s.png)
等效IPConfig和NSLookup的常用PowerShell网络命令
2023-11-12 14:54:59
![](https://img.aspxhome.com/file/2023/30/a263165_0s.jpg)
Windows10系统自带dll修复吗?
2023-10-25 15:55:41
![](https://img.aspxhome.com/file/2023/25/a218628_0s.jpg)
乌班图系统Ubuntu 12.04安装教程详细步骤(图解)
2023-03-26 15:29:54
![](https://img.aspxhome.com/file/2023/5/a318947_0s.jpg)
Win7配置ipv6协议的注意事项
2022-01-16 08:50:02
![](https://img.aspxhome.com/file/2023/27/a233341_0s.jpg)
win10音频服务未响应怎么办?win10音频服务未响应的解决教程
2022-01-17 02:44:26
![](https://img.aspxhome.com/file/2023/4/a309614_0s.png)
U盘存储空间提示已满的原因及解决
2022-04-07 18:53:19
![](https://img.aspxhome.com/file/2023/2/a289178_0s.jpg)
Photoshop CS6序列号有哪些?最新PSCS6序列号免费分享
2022-07-04 02:53:30
![](https://img.aspxhome.com/file/2023/7/a331974_0s.jpg)
Excel2010怎么修改网格线颜色 1、打开Excel2007
2022-10-28 17:09:33
视频编辑专家怎么去除杂音_视频编辑专家使用教程
2023-11-22 02:12:27
![](https://img.aspxhome.com/file/2023/4/a313315_0s.jpg)
wps表格怎样制作表头
2023-09-24 23:03:34
美册怎么去水印?美册去水印的方法
2022-07-09 13:32:26
![](https://img.aspxhome.com/file/2023/8/a333849_0s.jpg)
Win7笔记本键盘失灵外接也没用怎么解决?
2023-05-26 01:51:28
![](https://img.aspxhome.com/file/2023/27/a232613_0s.jpg)
在Excel中如何用IF函数清除工作表中的0?
2022-12-17 16:44:40
PPT制作中的配色技巧
2022-07-09 15:32:51
Win10 Build 19041.173发布:修复大容量USB设备错误
2022-02-16 02:40:44
![](https://img.aspxhome.com/file/2023/4/a304510_0s.jpg)
Win10无法登陆微软账户提示0X800b0109错误的解决方法
2022-08-07 04:09:56
![](https://img.aspxhome.com/file/2023/26/a227761_0s.jpg)
excel提取一列中出现次数最多和最少的文本数据
2022-03-05 10:52:15