about_PowerShell_Ise.exe
应用到: Windows PowerShell 3.0, Windows PowerShell 4.0
主题
about_PowerShell_Ise.exe
简短说明
说明如何使用 PowerShell_Ise.exe 命令行工具。展示语法并介绍命令行开关。
PowerShell_Ise.exe 启动 Windows PowerShell 集成脚本环境 (ISE) 会话。你可以在 Cmd.exe 以及 Windows PowerShell 中运行它。
若要运行 PowerShell_ISE.exe,请键入 PowerShell_ISE.exe、PowerShell_ISE 或 ISE。
详细说明
语法
PowerShell_Ise[.exe]
PowerShell_ISE[.exe]
ISE[.exe]
[–File]<FilePath[]> [–NoProfile] [–MTA]
–Help | ? | -? | /?
参数
-File
在 Windows PowerShell ISE 中打开指定文件。参数名 ("-File") 是可选的。若要列出多个文件,请输入一个文本字符串,并将其括在引号中。使用逗号将字符串中的文件名隔开。
例如:
PowerShell_ISE -File "File1.ps1,File2.ps1,File3.xml".
在 Windows PowerShell 中,允许文件名之间存在空格,但这一形式可能无法被其他程序(例如 Cmd.exe)正确解释。
你可以使用此参数打开任何文本文件,包括 Windows PowerShell 脚本文件和 XML 文件。
-Mta
使用多线程单元启动 Windows PowerShell ISE。此参数是在 Windows PowerShell 3.0 中引入的。单线程单元 (STA) 是默认值。
-NoProfile
不运行 Windows PowerShell 配置文件。默认情况下,在每个会话中运行 Windows PowerShell 配置文件。
当你正在编写共享内容(例如,将在具有不同配置文件的系统上运行的函数和脚本)时,建议使用该参数。有关详细信息,请参阅 about_Profiles (https://go.microsoft.com/fwlink/?LinkID=113729)。
-Help, -?, /?
显示针对 PowerShell_ISE.exe 的帮助。
示例
这些命令将启动 Windows PowerShell ISE。这两个命令是等效的,因此可以互换使用。
PS C:\>PowerShell_ISE.exe
PS C:\>PowerShell_ISE
PS C:\>ISE
这些命令将打开 Windows PowerShell ISE 中的 Get-Profile.ps1 脚本。这两个命令是等效的,因此可以互换使用。
PS C:\>PowerShell_ISE.exe -File .\Get-Profile.ps1
PS C:\>ISE -File .\Get-Profile.ps1
PS C:\>ISE .\Get-Profile.ps1
此命令将打开 Windows PowerShell ISE 中的 Get-Backups.ps1 脚本和 Get-BackupInstance.ps1 脚本。若要打开多个文件,则使用逗号将文件名隔开,并将整个文件名称值括在引号中。
PS C:\>ISE -File ".\Get-Backups.ps1,Get-BackupInstance.ps1"
此命令将启动不具有配置文件的 Windows PowerShell ISE。
PS C:\>ISE -NoProfile
此命令将获取针对 PowerShell_ISE.exe 的帮助。
PS C:\>ISE -help
另请参阅
about_PowerShell.exe
about_Windows_PowerShell_ISE
Windows PowerShell 3.0 集成脚本环境 (ISE)