啟動 Windows PowerShell

Windows PowerShell 是內嵌至多部主機的腳本引擎。 您將啟動的最常見主機是互動式命令列 powershell.exe 和互動式文稿環境 powershell_ise.exe

PowerShell 已重新命名二進位檔

PowerShell 第 6 版和更新版本使用 .NET Core。 支援的版本可在 Windows、macOS 和 Linux 上使用。

從 PowerShell 6 開始,PowerShell 二進位檔已針對 Windows 和 pwsh macOS 和 Linux 重新pwsh.exe命名。 您可以使用 啟動 PowerShell 預覽版本 pwsh-preview。 如需詳細資訊,請參閱 關於 pwsh

若要尋找 PowerShell 7 的 Cmdlet 參考和安裝檔,請使用下列連結:

Document 連結
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 來自定義工作階段。 如需詳細資訊,請參閱 命令行說明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位電腦時, 除了64位版本之外,還安裝了32位版本的Windows PowerShell。 當您執行 Windows PowerShell 時,預設會執行 64 位版本。

不過,您可能偶爾需要執行 Windows PowerShell (x86),例如當您使用需要 32 位版本的模組,或從遠端連線到 32 位電腦時。

若要啟動 32 位版本的 Windows PowerShell,請使用下列任何程式。

  • 單擊 [開始],輸入 Windows PowerShell,選取 [Windows PowerShell][x86],然後選取 [開啟]。