Windows PowerShell 是內嵌至多部主機的腳本引擎。 最常見的主機是互動式命令列 powershell.exe
和互動式腳稿環境 powershell_ise.exe
。
PowerShell 二進位名稱
PowerShell 第 6 版和更新版本使用 .NET (Core)。 支援的版本可在 Windows、macOS 和 Linux 上使用。
從 PowerShell 6 開始,針對 Windows 的 PowerShell 二進位檔命名為pwsh.exe
,而針對 macOS 和 Linux 的則命名為pwsh
。 您可以開始使用 PowerShell 預覽版本 pwsh-preview
。 如需詳細資訊,請參閱 關於 pwsh。
若要尋找 PowerShell 7 的 Cmdlet 參考和安裝檔,請使用下列連結:
文件 | 連結 |
---|---|
Cmdlet 參考資料 | PowerShell 模組瀏覽器 |
Windows 安裝 | 在 Windows 上安裝 PowerShell |
macOS 安裝 | 在macOS 上安裝PowerShell |
Linux 安裝 | 在Linux 上安裝PowerShell |
若要檢視其他 PowerShell 版本的內容,請參閱 如何使用 PowerShell 檔。
從 [開始] 功能表執行
- 開啟 [開始] 功能表,輸入 Windows PowerShell,選取 [Windows PowerShell],然後選取 [開啟]。
從命令提示字元執行
在 Windows 命令殼層、Windows PowerShell 或 Windows PowerShell ISE 中,若要啟動 Windows PowerShell,請輸入: PowerShell
。
您也可以使用 powershell.exe
程式的參數來自定義工作階段。 如需詳細資訊,請參閱 about_PowerShell_exe。
使用系統管理許可權執行
開啟 [開始] 功能表,輸入 Windows PowerShell,選取 [Windows PowerShell],然後選取 [以系統管理員身分執行]。
如何在舊版 Windows 上啟動 Windows PowerShell ISE
使用下列任一方法來啟動 Windows PowerShell ISE。
從 [開始] 功能表執行
- 開啟 [ 開始 ] 功能表,輸入 ISE,選取 [Windows PowerShell ISE],然後選取 [ 開啟]。
命令提示字元中
在 Windows 命令殼層、Windows PowerShell 或 Windows PowerShell ISE 中,若要啟動 Windows PowerShell,請輸入: PowerShell_ISE
。 在 Windows PowerShell 中,您可以使用別名 ise
。
使用系統管理許可權執行
選取 [開始],輸入 ISE,以滑鼠右鍵按兩下 [Windows PowerShell ISE],然後按兩下 [ 以系統管理員身分執行]。
啟動 32 位版本的 Windows PowerShell
64 位版本的 Windows 除了 64 位版本之外,還包括 32 位版本的 Windows PowerShell、Windows PowerShell(x86)。 根據預設,64 位版本會執行。
不過,您可能偶爾需要執行 Windows PowerShell (x86),例如當您使用需要 32 位版本的模組,或從遠端連線到 32 位電腦時。
若要啟動 32 位版本的 Windows PowerShell,請使用下列任何程式。
- 依序選取 [開始]、輸入 Windows PowerShell、選取 [Windows PowerShell] [x86],然後選取 [ 開啟]。