如何在 Windows 10 中以管理員身分開啟 Windows PowerShell

如何在 Windows 10 中以管理員身分開啟 Windows PowerShell

重點

要在Windows 10 上以管理員身份運行PowerShell,請打開“開始”選單,搜尋“PowerShell”,然後右鍵單擊結果並單擊“以管理員身份運行”,或者按Windows+X 打開超級用戶選單,然後點選「Windows PowerShell(管理員)」以管理員身分啟動 PowerShell。

幾乎您需要在 Windows PowerShell 中執行的所有操作都可以在普通視窗中執行。但是,您有時需要以管理員身分開啟 PowerShell才能執行某些需要提升權限的命令。就是這樣。

使用 Windows 搜尋啟動 PowerShell

您可以以管理員身分從Windows 搜尋列快速啟動 Windows PowerShell 。在搜尋列中,鍵入「Windows PowerShell」。接下來,右鍵點選搜尋結果中的 Windows PowerShell 應用,然後在出現的功能表中按一下「以管理員身分執行」。您也可以按一下「開始」功能表中的「以管理員身分執行」。

從「開始」功能表以管理員身分啟動 PowerShell。

Windows PowerShell 隨後將以管理模式啟動。

使用進階使用者選單以管理員身份啟動 PowerShell

您也可以從Windows Power User 選單以管理員身分啟動 Windows PowerShell 。若要存取進階使用者選單,請以滑鼠右鍵按一下桌面左下角的「開始」功能表(Windows 圖示)。將出現進階用戶選單。在這裡,按一下「Windows PowerShell(管理員)」。

按 Windows+X 使用熱鍵開啟進階使用者選單。

透過進階使用者選單啟動 Windows PowerShell。

Windows PowerShell 將以管理模式啟動。

使用運行應用程式

您可以透過「執行」以管理員權限開啟 Windows PowerShell。首先,按Windows+R開啟“運行”,然後在文字方塊中輸入“powershell”。接下來,按 Ctrl+Shift+Enter。

進入

Windows PowerShell 將以管理模式開啟。

從 PowerShell 切換到 PowerShell 管理

如果您已經在使用 PowerShell,但需要切換到管理模式,則無需關閉 PowerShell 即可執行此操作。只需運行這個命令:

start-process powershell -verb runas

從非提升的 PowerShell 以管理員身分啟動 PowerShell。

PowerShell 的新實例將以管理員權限開啟。

這裡的所有都是它的。如果您使用命令提示字元的頻率比使用 PowerShell 的頻率高,那麼您可能經常會發現自己處於類似的情況。不過不用擔心。您也可以以管理員身分輕鬆開啟命令提示字元

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *