- PowerShell功能特点
- PowerShell历史
- PowerShell和命令提示符的区别
- PowerShell与Bash Shell的区别
- PowerShell以管理员身份运行
- Windows PowerShell ISE
- PowerShell核心
- 创建并运行PowerShell脚本
- PowerShell注释
- PowerShell Cmdlet
- PowerShell基本cmdlet命令
- PowerShell Get-childItem命令
- PowerShell Get-Item命令
- PowerShell Get-Location命令
- PowerShell set-item命令
- PowerShell set-location命令
- PowerShell new-item命令
- PowerShell copy-item命令
- PowerShell move-item命令
- PowerShell remove-item命令
- PowerShell rename-item命令
- PowerShell add-content命令
- PowerShell clear-content
- PowerShell get-content命令
- PowerShell get-date命令
- PowerShell set-content命令
- PowerShell out-file命令
- PowerShell write-host命令
- PowerShell get-command命令
- PowerShell invoke-command命令
- PowerShell get-help命令
- PowerShell start-process命令
- PowerShell test-path命令
- PowerShell foreach-object命令
- PowerShell sort-object命令
- PowerShell where-object命令
- PowerShell变量
- PowerShell自动变量
- PowerShell首选项变量
- PowerShell数组
- PowerShell哈希表
- PowerShell运算符
- PowerShell算术运算符
- PowerShell赋值运算符
- PowerShell比较运算符
- PowerShell逻辑运算符
- PowerShell重定向运算符
- PowerShell拆分和合并运算符
- PowerShell if语句
- PowerShell if-else语句
- PowerShell else-if语句
- PowerShell Switch语句
- PowerShell Do-While循环
- PowerShell for循环
- PowerShell ForEach循环
- PowerShell While循环
- PowerShell Continue和Break
- PowerShell字符串
- PowerShell函数
- PowerShell Try Catch Finally
PowerShell以管理员身份运行
在Windows操作系统中,有五种方法可以以管理员身份运行PowerShell:
- 使用运行窗口(对于所有版本的Windows),以管理员身份运行PowerShell。
- 使用Cortana搜索栏(对于Windows 10)以管理员身份运行PowerShell。
- 在命令提示符下以管理员身份运行PowerShell。
- 从任务管理器以管理员身份运行PowerShell。
- 从“开始”菜单以管理员身份运行PowerShell。
方法1. 使用运行窗口以管理员身份运行PowerShell
第1步: 同时按下Windows + R键以弹出“运行”对话框。
第2步: 在框中键入PowerShell,然后单击OK(确定)按钮。 普通的Windows PowerShell将以当前用户身份启动。
第3步: 键入命令start-process PowerShell -verb runas
,然后按“enter”键。
第4步: 以上命令将以管理员身份提升Windows PowerShell的权限。
方法2. 使用Cortana搜索栏以管理员身份运行PowerShell(Windows 10)
第1步: Windows 10在任务栏中带有Cortana搜索字段。 在搜索字段中键入PowerShell
。
第2步: 右键单击Windows PowerShell,然后选择以管理员身份运行。 它将打开Windows PowerShell,它将以管理员身份运行。
方法3. 在命令提示符下以管理员身份运行PowerShell
第1步: 打开命令提示符,然后输入PowerShell
作为命令,然后按Enter键。
第2步: 现在,命令提示符将转到Windows PowerShell。
第3步: 键入命令start-process PowerShell -verb runas
,然后按Enter键。
方法4. 从任务管理器以管理员身份运行PowerShell
第1步: 在Windows 10或8中同时按下ctrl + shift + Esc按钮以打开任务管理器。 默认情况下,它显示的详细信息较少,请单击更多详细信息。按照以下图示操作。
扫描二维码
程序员编程王