熱門: 資料更新於2026年10月26日

軟體分類

網路軟體1,355
通訊社群321
影音軟體898
繪圖與影像539
辦公軟體1,120
開發工具3,132
AI工具527
安全與隱私385
系統工具3,113
遊戲523
教育與科學239
網路與IT284

PowerShell靜默安裝與解除安裝參數

PowerShell is a cross-platform task automation solution made up of a command-line shell, a scripting language, and a configuration management framework. PowerShell runs on Windows, Linux, and macOS.

Microsoft Corporation 終端機與命令列 #1 終端機與命令列

免互動安裝PowerShell、解除安裝,以及在部署工具中偵測安裝狀態所用的指令。只列出確定可用的指令:來自資訊清單,或是安裝程式技術的官方預設參數。

相關教學: 靜默安裝參數總整理:MSI、NSIS、Inno Setup · 用登錄檔或PowerShell解除安裝程式

使用winget

PowerShell
winget install --id Microsoft.PowerShell -e --silent --accept-package-agreements --accept-source-agreements
winget upgrade --id Microsoft.PowerShell -e --silent
winget uninstall --id Microsoft.PowerShell -e --silent

依安裝檔

64位元 · MSIX

靜默安裝Add-AppxPackage -Path PowerShell-7.6.9.msixbundle
解除安裝Get-AppxPackage -Name Microsoft.PowerShell | Remove-AppxPackage

64位元 · MSI · 所有使用者

靜默安裝msiexec /i PowerShell-7.6.9-win-x64.msi /qn /norestart
寫入記錄檔msiexec /i PowerShell-7.6.9-win-x64.msi /qn /norestart /l*v "%TEMP%\powershell-install.log"
解除安裝msiexec /x {5417B253-1A6D-4638-BC94-743A6EC2E6F4} /qn /norestart
MSI產品代碼
{5417B253-1A6D-4638-BC94-743A6EC2E6F4}
解除安裝登錄機碼
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{5417B253-1A6D-4638-BC94-743A6EC2E6F4}

ARM64 · MSIX

靜默安裝Add-AppxPackage -Path PowerShell-7.6.9.msixbundle
解除安裝Get-AppxPackage -Name Microsoft.PowerShell | Remove-AppxPackage

ARM64 · MSI · 所有使用者

靜默安裝msiexec /i PowerShell-7.6.9-win-arm64.msi /qn /norestart
寫入記錄檔msiexec /i PowerShell-7.6.9-win-arm64.msi /qn /norestart /l*v "%TEMP%\powershell-install.log"
解除安裝msiexec /x {A55580A2-6A8D-45DB-A673-0601CBA518C8} /qn /norestart
MSI產品代碼
{A55580A2-6A8D-45DB-A673-0601CBA518C8}
解除安裝登錄機碼
HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{A55580A2-6A8D-45DB-A673-0601CBA518C8}

32位元 · MSIX

靜默安裝Add-AppxPackage -Path PowerShell-7.6.9.msixbundle
解除安裝Get-AppxPackage -Name Microsoft.PowerShell | Remove-AppxPackage

32位元 · MSI · 所有使用者

靜默安裝msiexec /i PowerShell-7.6.9-win-x86.msi /qn /norestart
寫入記錄檔msiexec /i PowerShell-7.6.9-win-x86.msi /qn /norestart /l*v "%TEMP%\powershell-install.log"
解除安裝msiexec /x {F2DBB6E6-6A92-4712-A77E-350ADA889C0A} /qn /norestart
MSI產品代碼
{F2DBB6E6-6A92-4712-A77E-350ADA889C0A}
解除安裝登錄機碼
HKLM\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall\{F2DBB6E6-6A92-4712-A77E-350ADA889C0A}

PowerShell:下載、驗證、安裝

下載官方檔案,驗證SHA256後靜默安裝。

install-powershell.ps1
$url = 'https://github.com/PowerShell/PowerShell/releases/download/v7.6.9/PowerShell-7.6.9.msixbundle'
$sha256 = 'DA75C8AA23EDDA52E888FB586A46B923AB37A7C243719C2E8914B00130C5917A'
$file = Join-Path $env:TEMP 'PowerShell-7.6.9.msixbundle'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file

終端機與命令列熱門排行

查看全部
  1. PowerShell終端機與命令列 · Microsoft Corporation
  2. QPDF終端機與命令列 · QPDF
  3. Oh My Posh終端機與命令列 · Jan De Dobbeleer
  4. Microsoft Azure CLI終端機與命令列 · Microsoft Corporation
  5. yq終端機與命令列 · Mike Farah
  6. Alacritty終端機與命令列 · Alacritty
  7. fzf終端機與命令列 · Junegunn Choi
  8. PuTTY終端機與命令列 · Simon Tatham
  9. cURL終端機與命令列 · curl
  10. Tabby終端機與命令列 · Tabby Developers

Microsoft Corporation的其他軟體

查看全部

標籤

分享