Microsoft Data Migration Assistantを確認画面なしでインストール・アンインストールし、展開ツールで検出するためのコマンドです。マニフェストの記載か、インストーラー技術の既定値として確実なコマンドだけを表示しています。
関連ガイド: サイレントインストールのオプション一覧 · レジストリとPowerShellでアンインストールする方法
wingetを使う
PowerShell
winget install --id Microsoft.DataMigrationAssistant -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.DataMigrationAssistant -e --silentwinget uninstall --id Microsoft.DataMigrationAssistant -e --silentインストーラー別
64ビット · MSI · en-US
サイレントインストール
msiexec /i DataMigrationAssistant.msi /qn /norestartログを出力
msiexec /i DataMigrationAssistant.msi /qn /norestart /l*v "%TEMP%\microsoft-data-migration-assistant-install.log"アンインストール
msiexec /x {6AB2C3EE-9B0E-4F8B-A0E2-712E915A86BD} /qn /norestart- MSIプロダクトコード
- {6AB2C3EE-9B0E-4F8B-A0E2-712E915A86BD}
- アンインストール用レジストリキー
- HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\{6AB2C3EE-9B0E-4F8B-A0E2-712E915A86BD}
PowerShell:ダウンロード・検証・インストール
公式ファイルをダウンロードし、SHA256を検証してからサイレントインストールします。
install-microsoft-data-migration-assistant.ps1
$url = 'https://download.microsoft.com/download/c/6/3/c63d8695-cef2-43c3-af0a-4989507e429b/DataMigrationAssistant.msi'
$sha256 = '2BD9D47770608EF6D47BFE6B698AD550506A6BCC36F71DCA8D1936BD82B42FC1'
$file = Join-Path $env:TEMP 'DataMigrationAssistant.msi'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Start-Process msiexec.exe -ArgumentList '/i', ('"{0}"' -f $file), '/qn', '/norestart' -Wait