Commands for installing Surface without prompts, removing it again and detecting it from deployment tools. A command is shown only when it is certain: from the manifest or the installer technology’s documented default.
Related guide: Silent install switches: MSI, NSIS, Inno Setup · Uninstall a program with the registry or PowerShell
With winget
winget install --id Microsoft.SurfaceApp -e --silent --accept-package-agreements --accept-source-agreementswinget upgrade --id Microsoft.SurfaceApp -e --silentwinget uninstall --id Microsoft.SurfaceApp -e --silentBy installer
64-bit · MSIX
Add-AppxPackage -Path Microsoft.SurfaceHub_76.5120.174.0_Desktop_X64.Arm64.msixbundleGet-AppxPackage -Name Microsoft.SurfaceHub | Remove-AppxPackageARM64 · MSIX
Add-AppxPackage -Path Microsoft.SurfaceHub_76.5120.174.0_Desktop_X64.Arm64.msixbundleGet-AppxPackage -Name Microsoft.SurfaceHub | Remove-AppxPackagePowerShell: download, verify, install
Downloads the official file, checks its SHA256 and installs it silently.
$url = 'https://download.microsoft.com/download/1a91fe3e-b6be-465d-bda0-b8f12fd0fca7/Microsoft.SurfaceHub_76.5120.174.0_Desktop_X64.Arm64.msixbundle'
$sha256 = '6A7F09C1F53FB62D8721C0F706C44D86A326F1C6FFED4DFFCCFBB093F8BFC95B'
$file = Join-Path $env:TEMP 'Microsoft.SurfaceHub_76.5120.174.0_Desktop_X64.Arm64.msixbundle'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file $url = 'https://download.microsoft.com/download/1a91fe3e-b6be-465d-bda0-b8f12fd0fca7/Microsoft.SurfaceHub_76.5120.174.0_Desktop_X64.Arm64.msixbundle'
$sha256 = '6A7F09C1F53FB62D8721C0F706C44D86A326F1C6FFED4DFFCCFBB093F8BFC95B'
$file = Join-Path $env:TEMP 'Microsoft.SurfaceHub_76.5120.174.0_Desktop_X64.Arm64.msixbundle'
Invoke-WebRequest -Uri $url -OutFile $file -UseBasicParsing
if ((Get-FileHash $file -Algorithm SHA256).Hash -ne $sha256) { throw 'SHA256 mismatch' }
Add-AppxPackage -Path $file