Kommandon för att installera Surface utan frågor, ta bort programmet igen och identifiera det i distributionsverktyg. Ett kommando visas bara när det är säkert: från manifestet eller som installationsteknikens dokumenterade standard.
Relaterad guide: Parametrar för tyst installation: MSI, NSIS, Inno · Avinstallera program via registret eller PowerShell
Med 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 --silentPer installationsfil
64-bitars · 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: ladda ner, kontrollera, installera
Laddar ner den officiella filen, kontrollerar dess SHA256 och installerar tyst.
$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