Windows PowerShell ISE 的键盘快捷方式Keyboard Shortcuts for the Windows PowerShell ISE
01/02/2020
本文内容
使用以下键盘快捷方式在 Windows PowerShell® 集成脚本环境 (ISE) 中执行操作。Use the following keyboard shortcuts to perform actions in Windows PowerShell® Integrated Scripting Environment (ISE). Windows PowerShell ISE 可作为 Windows Server 和 Windows 客户端操作系统的一部分,但是也可作为 Windows Management Framework 4.0 下载包的一部分安装在早期的 Windows 操作系统上。Windows PowerShell ISE is available as part of the Windows Server and Windows client operating systems, but can also be installed on some older Windows operating systems as part of the Windows Management Framework 4.0 download package.
编辑文本的键盘快捷方式Keyboard shortcuts for editing text
编辑文本时可以使用以下键盘快捷方式。You can use the following keyboard shortcuts when you edit text.
操作Action
键盘快捷方式Keyboard Shortcuts
用于Use in
帮助Help
F1F1
脚本窗格“重要提示”:你可以指定 F1 帮助来自 docs.microsoft.com 还是下载的帮助(请参阅“Update-Help”)。Script Pane Important: You can specify that F1 help comes from docs.microsoft.com or downloaded Help (see Update-Help). 若要选择,请单击“工具”、“选项”,然后在“常规设置”选项卡上,设置或清除“使用本地帮助内容,而不是联机内容”。To select, click Tools, Options, then on the General Settings tab, set or clear Use local help content instead of online content.
CopyCopy
CTRL+CCTRL+C
脚本窗格、命令窗格、输出窗格Script Pane, Command Pane, Output Pane
剪切Cut
CTRL+XCTRL+X
脚本窗格、命令窗格Script Pane, Command Pane
展开或折叠大纲Expand or Collapse Outlining
CTRL+MCTRL+M
脚本窗格Script Pane
在脚本中查找Find in Script
CTRL+FCTRL+F
脚本窗格Script Pane
在脚本中查找下一个Find Next in Script
F3F3
脚本窗格Script Pane
在脚本中查找上一个Find Previous in Script
SHIFT+F3SHIFT+F3
脚本窗格Script Pane
查找匹配的括号Find Matching Brace
CTRL+]CTRL+]
脚本窗格Script Pane
粘贴Paste
CTRL+VCTRL+V
脚本窗格、命令窗格Script Pane, Command Pane
重做Redo
CTRL+YCTRL+Y
脚本窗格、命令窗格Script Pane, Command Pane
在脚本中替换Replace in Script
CTRL+HCTRL+H
脚本窗格Script Pane
保存Save
CTRL+SCTRL+S
脚本窗格Script Pane
全选Select All
CTRL+ACTRL+A
脚本窗格、命令窗格、输出窗格Script Pane, Command Pane, Output Pane
显示代码段Show Snippets
CTRL+JCTRL+J
脚本窗格、命令窗格Script Pane, Command Pane
撤消Undo
CTRL+ZCTRL+Z
脚本窗格、命令窗格Script Pane, Command Pane
运行脚本的键盘快捷方式Keyboard shortcuts for running scripts
在脚本窗格中运行脚本时,可使用以下键盘快捷方式。You can use the following keyboard shortcuts when you run scripts in the Script Pane.
操作Action
键盘快捷方式Keyboard Shortcut
新建New
CTRL+NCTRL+N
打开Open
CTRL+OCTRL+O
运行Run
F5F5
运行选定内容Run Selection
F8F8
停止执行Stop Execution
CTRL+BREAK。CTRL+BREAK. 可以在上下文不明确时(未选定任何文本时)使用 CTRL+C。CTRL+C can be used when the context is unambiguous (when there is no text selected).
Tab(切换到下一个脚本)Tab (to next script)
CTRL+TAB 注意: 按 Tab 键切换到下一个脚本仅适用于打开一个 Windows PowerShell 选项卡或打开多个 Windows PowerShell 选项卡,但焦点在脚本窗格中的情况。CTRL+TAB Note: Tab to next script works only when you have a single Windows PowerShell tab open, or when you have more than one Windows PowerShell tab open, but the focus is in the Script Pane.
Tab(切换到上一个脚本)Tab (to previous script)
CTRL+SHIFT+TAB 注意: 按 Tab 键切换到上一个脚本适用于仅打开一个 Windows PowerShell 选项卡或打开多个 Windows PowerShell 选项卡,但焦点在脚本窗格中的情况。CTRL+SHIFT+TAB Note: Tab to previous script works when you have only one Windows PowerShell tab open, or if you have more than one Windows PowerShell tab open, and the focus is in the Script Pane.
自定义视图的键盘快捷方式Keyboard shortcuts for customizing the view
可以使用以下键盘快捷方式在 Windows PowerShell ISE 中自定义视图。You can use the following keyboard shortcuts to customize the view in Windows PowerShell ISE. 可从应用程序中的所有窗格对它们进行访问。They are accessible from all the panes in the application.
操作Action
键盘快捷方式Keyboard Shortcut
转到命令 (v2) 或控制台(v3 和更高版本)窗格Go to Command (v2) or Console (v3 and later) Pane
CTRL+DCTRL+D
转到输出窗格(仅 v2)Go to Output Pane (v2 only)
CTRL+SHIFT+OCTRL+SHIFT+O
转到脚本窗格Go to Script Pane
CTRL+ICTRL+I
显示脚本窗格Show Script Pane
CTRL+RCTRL+R
隐藏脚本窗格Hide Script Pane
CTRL+RCTRL+R
向上移动脚本窗格Move Script Pane Up
CTRL+1CTRL+1
向右移动脚本窗格Move Script Pane Right
CTRL+2CTRL+2
最大化脚本窗格Maximize Script Pane
CTRL+3CTRL+3
放大Zoom In
CTRL++CTRL++
缩小Zoom Out
CTRL+-CTRL+-
用于调试脚本的键盘快捷方式Keyboard shortcuts for debugging scripts
调试脚本时,可使用以下键盘快捷方式。You can use the following keyboard shortcuts when you debug scripts.
操作Action
键盘快捷方式Keyboard Shortcut
用于Use in
运行/继续Run/Continue
F5F5
脚本窗格,调试脚本时Script Pane, when debugging a script
步入Step Into
F11F11
脚本窗格,调试脚本时Script Pane, when debugging a script
步越Step Over
F10F10
脚本窗格,调试脚本时Script Pane, when debugging a script
步出Step Out
SHIFT+F11SHIFT+F11
脚本窗格,调试脚本时Script Pane, when debugging a script
显示调用堆栈Display Call Stack
CTRL+SHIFT+DCTRL+SHIFT+D
脚本窗格,调试脚本时Script Pane, when debugging a script
列出断点List Breakpoints
CTRL+SHIFT+LCTRL+SHIFT+L
脚本窗格,调试脚本时Script Pane, when debugging a script
切换断点Toggle Breakpoint
F9F9
脚本窗格,调试脚本时Script Pane, when debugging a script
移除所有断点Remove All Breakpoints
CTRL+SHIFT+F9CTRL+SHIFT+F9
脚本窗格,调试脚本时Script Pane, when debugging a script
停止调试器Stop Debugger
SHIFT+F5SHIFT+F5
脚本窗格,调试脚本时Script Pane, when debugging a script
备注
在 Windows PowerShell ISE 中调试脚本时,也可以使用为 Windows PowerShell 控制台而设计的键盘快捷方式。You can also use the keyboard shortcuts designed for the Windows PowerShell console when you debug scripts in Windows PowerShell ISE. 若要使用这些快捷方式,必须在命令窗格中键入该快捷方式并按 ENTER。To use these shortcuts, you must type the shortcut in the Command Pane and press ENTER.
操作Action
键盘快捷方式Keyboard Shortcut
用于Use in
继续Continue
C
控制台窗格,调试脚本时Console Pane, when debugging a script
步入Step Into
S
控制台窗格,调试脚本时Console Pane, when debugging a script
步越Step Over
V
控制台窗格,调试脚本时Console Pane, when debugging a script
步出Step Out
O
控制台窗格,调试脚本时Console Pane, when debugging a script
重复上一命令(用于步入或步越)Repeat Last Command (for Step Into or Step Over)
ENTERENTER
控制台窗格,调试脚本时Console Pane, when debugging a script
显示调用堆栈Display Call Stack
K
控制台窗格,调试脚本时Console Pane, when debugging a script
停止调试Stop Debugging
Q
控制台窗格,调试脚本时Console Pane, when debugging a script
列出脚本List the Script
L
控制台窗格,调试脚本时Console Pane, when debugging a script
显示控制台调试命令Display Console Debugging Commands
H 或 ?H or ?
控制台窗格,调试脚本时Console Pane, when debugging a script
Windows PowerShell 选项卡的键盘快捷方式Keyboard shortcuts for Windows PowerShell tabs
使用 Windows PowerShell 选项卡时,可使用以下键盘快捷方式。You can use the following keyboard shortcuts when you use Windows PowerShell tabs.
操作Action
键盘快捷方式Keyboard Shortcut
关闭 PowerShell 选项卡Close PowerShell Tab
CTRL+WCTRL+W
新建 PowerShell 选项卡New PowerShell Tab
CTRL+TCTRL+T
上一个 PowerShell 选项卡Previous PowerShell tab
CTRL+SHIFT+TAB。CTRL+SHIFT+TAB. 此快捷键仅在所有 Windows PowerShell 选项卡上都未打开任何文件时可用。This shortcut works only when no files are open on any Windows PowerShell tab.
下一个 Windows PowerShell 选项卡Next Windows PowerShell tab
CTRL+TAB。CTRL+TAB. 此快捷键仅在所有 Windows PowerShell 选项卡上都未打开任何文件时可用。This shortcut works only when no files are open on any Windows PowerShell tab.
启动和退出的键盘快捷方式Keyboard shortcuts for starting and exiting
可以使用以下键盘快捷方式来启动 Windows PowerShell 控制台 (PowerShell.exe) 或退出 Windows PowerShell ISE。You can use the following keyboard shortcuts to start the Windows PowerShell console (PowerShell.exe) or to exit Windows PowerShell ISE.
操作Action
键盘快捷方式Keyboard Shortcut
退出Exit
ALT+F4ALT+F4
PowerShell.exe (Windows PowerShell 控制台)Start PowerShell.exe(Windows PowerShell console)
CTRL+SHIFT+PCTRL+SHIFT+P
另请参阅See Also