在远程机器上卸载 .net core sdk 1.x

问题描述

需要在远程计算机上卸载 .net sdk 旧版本。pop up window 在 PowerShell 脚本下方尝试卸载旧 .net sdk 版本时显示。所以 .net core sdk 不会在没有用户输入的情况下在远程 Windows 机器上卸载。

If
(Test-Path "C:\Program Files\dotnet\sdk\1.1.14")
{
start-process -FilePath $env:systemroot\system32\msiexec.exe -ArgumentList "/X{BCB0834B-EC91-4237-AF17-A2F67FC93796}"
}

尝试添加 /quite

start-process -FilePath $env:systemroot\system32\msiexec.exe -ArgumentList "/X{BCB0834B-EC91-4237-AF17-A2F67FC93796} /quiet" but not working 
[with quite option][2]as well

解决方法

$arguments = "/quiet"

Start-Process -FilePath $env:systemroot\system32\msiexec.exe -ArgumentList "/X{BCB0834B-EC91-4237-AF17-A2F67FC93796}