PowerShell is a more powerful command-line shell and scripting language than Command Prompt. Since the release of Windows 10, it’s become the default choice, and there are many ways you can open it.

与命令提示符相比,PowerShell是一种更强大的命令行外壳和脚本语言。 自Windows 10发布以来,它已成为默认选择,您可以通过多种方式打开它。

PowerShell is more complicated to use, but it’s a much more robust and powerful than Command Prompt. That’s why it’s become the preferred scripting language and command-line interface for Power Users and IT pros, competing favorably with other Linux and Unix-like shells.

PowerShell的使用更加复杂,但是它比命令提示符更加健壮和强大。 这就是为什么它已成为Power Users和IT专业人员首选的脚本语言和命令行界面,并与其他Linux和类似Unix的外壳竞争激烈的原因。

PowerShell is a handy tool that uses cmdlets (pronounced “command-lets”), which allow you to do some pretty cool things like automate Windows or automatically connect to a VPN when you launch specific apps.

PowerShell是使用cmdlet(发音为“ command-lets”)的便捷工具,它使您可以执行一些很酷的事情,例如在启动特定应用程序时自动 执行Windows或自动连接到VPN 。

While you can open PowerShell from the Start menu, this list includes some (potentially) easier and lesser-known ways you can launch this tool.

虽然可以从“开始”菜单打开PowerShell,但是此列表包括一些(可能)更简单且鲜为人知的启动此工具的方法。

从高级用户菜单 (From the Power Users Menu)

The Power Users menu appears in the taskbar when you press Windows+X. It’s an easy way to access a multitude of settings, utilities, and system programs from one menu.

当您按Windows + X时,高级用户菜单出现在任务栏中。 这是一种从一个菜单访问多种设置,实用程序和系统程序的简便方法。

To open PowerShell from this menu, press Windows+X, and then click “Windows PowerShell” or “Windows PowerShell (Admin).”

要从此菜单打开PowerShell,请按Windows + X,然后单击“ Windows PowerShell”或“ Windows PowerShell(Admin)”。

Note that since the Creators Update for Windows 10, PowerShell appears in the Power Users menu by default. If you don’t see it, your computer may not be up-to-date, or, perhaps, you replaced it with Command Prompt in the Settings menu.

请注意,自Windows 10的创建者更新以来, PowerShell默认显示在“高级用户”菜单中。 如果看不到它,则说明您的计算机可能不是最新的,或者您可能是在“设置”菜单中将其替换为“命令提示符”。

It’s straightforward to switch back to showing the PowerShell on the menu. Follow our steps here, but toggle-On the “Replace Command Prompt with Windows PowerShell” option, instead.

切换回在菜单上显示PowerShell很简单。 请按照此处的步骤进行操作,但是请启用“使用Windows PowerShell替换命令提示符”选项。

从开始菜单搜索 (From a Start Menu Search)

Probably one of the fastest ways to open PowerShell is via a Start Menu Search. Just click the Start or Search icon, and then type “powershell” in the search box.

打开PowerShell最快的方法之一就是通过“开始”菜单搜索。 只需单击“开始”或“搜索”图标,然后在搜索框中键入“ powershell”。

Now, click “Open” or “Run as Administrator” to open PowerShell either normally or with administrative privileges.

现在,单击“打开”或“以管理员身份运行”以正常或具有管理特权打开PowerShell。

通过滚动开始菜单中的所有应用程序 (By Scrolling Through All Apps in the Start Menu)

Because PowerShell is a default Windows 10 program, you can find its application icon in the “All Apps” section of the Start Menu.

由于PowerShell是默认的Windows 10程序,因此可以在“开始”菜单的“所有应用程序”部分中找到其应用程序图标。

Just click the Start icon, and then click “All Apps” to expand the list of applications installed on your computer.

只需单击“开始”图标,然后单击“所有应用程序”以展开计算机上安装的应用程序列表。

Scroll down, click the “Windows PowerShell” folder, and then select “Windows PowerShell” to open it.

向下滚动,单击“ Windows PowerShell”文件夹,然后选择“ Windows PowerShell”将其打开。

To run PowerShell with admin privileges, right click the icon, and then click “Run as Administrator” in the context menu that appears.

要以管理员权限运行PowerShell,请右键单击该图标,然后在出现的上下文菜单中单击“以管理员身份运行”。

从运行框 (From the Run Box)

Press Windows+R to open the Run dialog box, and then type “powershell” in the text box. You can either click “OK” (or press the Enter) to open a regular PowerShell window, or press Ctrl+Shift+Enter to open an elevated PowerShell window.

按Windows + R打开“运行”对话框,然后在文本框中键入“ powershell”。 您可以单击“确定”(或按Enter)打开常规的PowerShell窗口,或按Ctrl + Shift + Enter打开提升的PowerShell窗口。

从文件资源管理器的文件菜单 (From the File Explorer File Menu)

If you need to open a PowerShell instance from a specific folder on your computer, you can use File Explorer to initiate it within the currently selected directory.

如果需要从计算机上的特定文件夹打开PowerShell实例,则可以使用文件资源管理器在当前选定的目录中启动它。

To do so, open File Explorer and navigate to the folder from which you want to open a PowerShell window.

为此,请打开“文件资源管理器”并导航到要从中打开PowerShell窗口的文件夹。

Once there, click “File,” hover over “Open Windows PowerShell”, and then select one of the following options:

到达该位置后,单击“文件”,将鼠标悬停在“打开Windows PowerShell”上,然后选择以下选项之一:

  • “Open Windows PowerShell”: This opens a PowerShell window within the current folder with standard permissions.

    “打开Windows PowerShell”:这将使用标准权限在当前文件夹中打开一个PowerShell窗口。

  • “Open Windows PowerShell as Administrator”: This opens a PowerShell window within the current folder with administrator permissions.

    “以管理员身份打开Windows PowerShell”:具有管理员权限的当前文件夹中将打开一个PowerShell窗口。

Note that this method doesn’t work from the “Quick Access” directory. You’ll find the option to open PowerShell grayed out when you click “File.”

请注意,该方法不适用于“快速访问”目录。 单击“文件”后,您会发现打开PowerShell的选项呈灰色。

从文件资源管理器地址栏中 (From the File Explorer Address Bar)

To open PowerShell from the File Explorer address bar, open File Explorer. Click the address bar, type “powershell”, and then press Enter.

要从文件资源管理器地址栏中打开PowerShell,请打开文件资源管理器。 单击地址栏,键入“ powershell”,然后按Enter。

PowerShell will open with the path of the current folder already set.

PowerShell将打开,并已设置当前文件夹的路径。

从任务管理器 (From Task Manager)

To open Task Manager, press Ctrl+Shift+Esc. In the window that appears, click “More details”.

要打开任务管理器,请按Ctrl + Shift + Esc。 在出现的窗口中,单击“更多详细信息”。

Now, click File > Run New Task.

现在,单击文件>运行新任务。

Type “powershell” in the text box, and then click “OK” to continue.

在文本框中键入“ powershell”,然后单击“确定”继续。

If you want to run PowerShell with administrator permissions, make sure the “Create This Task with Administrator Privileges” option is selected.

如果要使用管理员权限运行PowerShell,请确保选中“使用管理员权限创建此任务”选项。

从右键单击上下文菜单 (From the Right-Click Context Menu)

Another way you can open Windows PowerShell from wherever you are is via the right-click context menu. If you simply right click the folder, though, you won’t see the option. Instead, press Shift as you right click. This opens the context menu and includes the “Open PowerShell Window Here” option.

无论您身在何处,都可以通过右键单击上下文菜单打开Windows PowerShell。 但是,如果只是简单地右键单击该文件夹,则不会看到该选项。 而是在右键单击时按Shift。 这将打开上下文菜单,并包括“此处打开PowerShell窗口”选项。

You can also permanently add PowerShell to the right-click context menu with this registry hack.

您也可以使用此注册表hack将PowerShell永久添加到右键单击上下文菜单中。

在桌面上创建PowerShell快捷方式 (Create a PowerShell Shortcut on the Desktop)

If you’d rather just click an icon to open PowerShell, it’s easy to create one for your Desktop.

如果您只想单击一个图标以打开PowerShell,则很容易为您的桌面创建一个。

To do so, right click an empty spot on the Desktop. In the context menu, click New > Shortcut.

为此,右键单击桌面上的空白处。 在上下文菜单中,单击新建>快捷方式。

In the window that appears, type “powershell” in the text box, and then click “Next” to continue.

在出现的窗口中,在文本框中键入“ powershell”,然后单击“下一步”继续。

Name your shortcut, and then click “Finish” to create it.

命名您的快捷方式,然后单击“完成”以创建它。

Now, whenever you double click the icon, PowerShell will open.

现在,只要双击该图标,PowerShell就会打开。

If you want to open PowerShell with administrative privileges, right click the shortcut and choose “Properties” from the context menu.

如果要使用管理权限打开PowerShell,请右键单击快捷方式,然后从上下文菜单中选择“属性”。

Click “Advanced”.

点击“高级”。

Finally, select the box next to the “Run as Administrator” option to allow the shortcut to run with the highest privileges.

最后,选择“以管理员身份运行”选项旁边的框,以允许该快捷方式以最高权限运行。

Click “OK” in both windows to save your changes and close the properties windows.

在两个窗口中单击“确定”以保存更改并关闭属性窗口。



Did we forget one? Let us know in the comments below!

我们忘记了吗? 在下面的评论中让我们知道!

翻译自: https://www.howtogeek.com/662611/9-ways-to-open-powershell-in-windows-10/

在Windows 10中打开PowerShell的9种方法相关推荐

  1. windows启动管理器_如何在Windows 10中打开任务管理器,方法众多,值得收藏

    任务管理器是一个很棒的工具,可以帮助用户管理在Windows 10电脑上运行的应用程序.进程和服务.任务管理器功能很多,查看系统状态.管理启动项.监测GPU行为--,几乎日常工作中所需的所有功能都能用 ...

  2. 在Windows 10中截取截图的6种方式 简介

    在Windows 10中截取截图的6种方式 简介 截图对于不同的目的很重要.它可以用于捕获笔记本电脑上的任何内容的截图.所以,如果你使用Windows 10,你可能不知道如何截图,因为它是比较新的.因 ...

  3. 如何在Windows 10中打开设置?

    Windows 10 provides the Windows Settings in order to configure different settings of the Windows 10. ...

  4. eclipse下如何打开被关闭的项目_如何在Windows 10中打开和关闭平板电脑模式

    默认情况下,将可转换计算机重新配置为平板电脑时,Windows 10会自动切换到平板电脑模式.如果你希望手动打开或关闭平板电脑模式,可以通过多种方法进行. 自动平板电脑模式在Windows 10中的工 ...

  5. 服务器显示隐藏任务,在Windows 10中隐藏任务栏的简单方法

    作为Windows用户,您可能已经注意到任务栏总是显示在屏幕上.对于某些用户来说,这可能是最令人欣慰的事情.但是,对于其余用户而言,全屏显示的任务栏很烦人.在这些人中,确实有一些人不知道可以随时隐藏它 ...

  6. php 在函数里打开链接,JavaScript中打开链接的几种方法介绍

    如何使用JavaScript打开链接?本篇文章我们就来看看使用JavaScript打开链接的几种方法介绍. 我们先来看一段代码 使用Javascript实现打开链接,需要在location.href中 ...

  7. windows目录内打开CMD的几种方法

    ​在工作中常常会有需要在某个文件夹内使用cmd的情况,例如运行某脚本,下面演示几种方法. 以进入以下目录操作为例: "姿势"一 : 常用的cd命令 cd命令是我们平常使用比较多的方 ...

  8. 台式机Windows 10系统打开或者断开网络的方法

    控制面板路径: 控制面板\所有控制面板项\网络连接\以太网 选择以太网,右击,选择禁用或者开启就行了 或者按照如下所示: 选择网络 选择以太网 选择更改适配器选项 右击以太网,选择,禁用或者启用

  9. 计算机安全模式无法进入安全模式,如何解决无法在Windows 10中进入安全模式的问题...

    在下面的文章中,我们将讨论进入安全模式的众多方法.但是,在讨论这些方法之前,了解Windows 10中的安全模式是什么,以及无法进入安全模式会带来什么不利影响十分重要.安全模式确实有很多优点,特别是在 ...

  10. i12蓝牙耳机怎么设置成中文_windows10的蓝牙怎么打开?如何修复Windows 10中的蓝牙问题...

    蓝牙是一项如此出色的技术进步,几乎让人感觉像是魔术.这些电线去哪了?它是如何工作的?至少可以说,从生活中消除电缆和电线时,会感到莫名其妙.但是,像所有伟大的技术一样, 蓝牙也不是没有问题.您可能会猜到 ...

最新文章

  1. Fragment之底层关键操作函数moveToState
  2. 如何在JavaScript中反转字符串?
  3. 二叉树的层序遍历—leetcode102
  4. SAP WebClient UI view controller所有可用的属性列表
  5. 向mvc controller传递json数组
  6. IIS的安全配置策略
  7. 分析lammps文件_LAMMPS学习系列(24)
  8. Tensorflow安装问题: Could not find a version that satisfies the requirement tensorflow
  9. C#根据屏幕尺寸大小重新定位控件大小和位置
  10. Matlab半方差函数/变异函数
  11. 使用Word制作签名电子版
  12. 读懂这三本书,才算真懂大数据!(套装共3册) (如何读懂大数据主题系列) - 电子书下载(高清版PDF格式+EPUB格式)...
  13. Uni-App实现人脸识别功能
  14. 电脑num lock键如何默认锁定
  15. 魔百和CM311-1a_YST代工_安卓9.0_S905L3A_卡刷固件包
  16. 用ESP8266连接 0.96寸 OLED屏幕
  17. HFSS初探日志(六)被动毫米波成像系统馈源天线
  18. A - 非提的救赎 Fzu-2190 (单调栈)
  19. Java坑人面试题系列: 比对while与for循环(中级难度)
  20. Java 提取PDF图片(pdfbox)Extract PDF document images

热门文章

  1. @Deprecated注解
  2. 家庭和睦、人生平淡也是一种成功
  3. 联想笔记本重装windows10系统
  4. 机器学习规则学习_使用机器学习发现动作规则
  5. python h5游戏_记一次游戏H5开发经验
  6. noi linux黑屏,急!!!noi linux 安装后黑屏怎么处理?(xp系统)
  7. 关于如何有效锻炼肌肉的十个小贴士(转)
  8. 软考信息系统项目管理师考试论文写作技巧
  9. Matlab中pickic_高颜值甜品DIY |春季甜品Picnic野餐系列,一起过个惬意慵懒的午后时光❗️...
  10. MFC中添加工具条(TOOLBAR)