如何通过Powershell卸载Dell Support协助?

时间:2019-05-09 20:44:43

标签: powershell

因此,有一篇关于脆弱的支持协助的文章,bla bla。

上层管理人员认为支持帮助不安全,并已下令将其从每台计算机中删除。....

不,我不能/不会尝试说服他们,这将以一种或另一种方式发生

在过去的8个小时里,尝试完成此任务一直是一场噩梦,而在下一个尝试之后,我尝试失败的脚本只是让这个该死的程序NOT DIE

这是我到目前为止所拥有的

MsiExec.exe /X "{0309AC01-330F-494C-B27D-58E297E4674F}" /quiet
MsiExec.exe /X "{F1D17890-F41B-4BFA-8893-B2C8A248BE0D}" /quiet

$CurrentSAPkg = Get-WMIObject -Class Win32_Product  | Where-Object { $_.Name -like "Dell*" }
$CurrentSAPkg.Uninstall()

& "C:\Program Files\Dell\SupportAssist\uninstaller.exe" /arp /S

get-WMIObject部分有效,而uninstaller.exe / arp / S有效

但是那些仅适用于旧版本,而新版本则需要更多类似于前两个命令的内容,但是存在问题

/ quiet标志使其不起作用。如果我忽略了静默标志,则会弹出一个窗口,“您确定”是的,它会通过静默标志卸载,什么也不会发生,程序会保留

我使用以下方法获取卸载路径

$regQuery32 = Get-ChildItem -Path "HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall" | Where {$_.GetValue("DisplayName") -match "Dell*"}

我真的很讨厌现在的支持帮助,我希望它消失,我不知所措。

4 个答案:

答案 0 :(得分:1)

所以我遇到了完全相反的问题。我能够删除较新的版本,但是由于UninstallString导致自动化失败,因此返回了“ C:\ Program Files \ Dell \ SupportAssist \ uninstaller.exe / arp”的任何内容均无法自动提示展示(我大约有700个代理从其中删除了这些废话,有些代理有多个版本,所以我感到您很痛苦)。

对于较新的版本,我使用了:

$SAVer = Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall, HKLM:\SOFTWARE\Wow6432Node\Microsoft\Windows\CurrentVersion\Uninstall  |
    Get-ItemProperty |
        Where-Object {$_.DisplayName -match "SupportAssist" } |
        Where-Object {$_.DisplayVersion -notlike "3.2*"} | 
            Select-Object -Property DisplayVersion, UninstallString, PSChildName

ForEach ($ver in $SAVer) {

    If ($ver.UninstallString) {

        $uninst = $ver.UninstallString
        & cmd /c $uninst /quiet /norestart

    }
}

我将研究您为较旧版本(2.0和更早版本)显示的方法,以查看是否可以解决我的问题。希望我的代码段对您有所帮助。干杯。

答案 1 :(得分:1)

遇到了类似的问题。我有一堆电脑,都装有不同版本的 Support Assist。我从几个不同的来源编译了这个。到目前为止,我已经取得了非常好的成功。我正在使用 PDQ 部署。我不是最精通 PowerShell 的人,但也许这会有所帮助。

"C:\ProgramData\Package Cache\{ec40a028-983b-4213-af2c-77ed6f6fe1d5}\DellUpdateSupportAssistPlugin.exe" /uninstall /quiet
MsiExec.exe /qn /norestart /X{E98E94E2-12D1-48E5-AC69-2C312F466136}
MsiExec.exe /qn /norestart /X{806422F1-FC4E-4D7C-8855-05748AEFC031}
MsiExec.exe /X{0309AC01-330F-494C-B27D-58E297E4674F} /qn REBOOT=REALLYSUPRESS
MsiExec.exe /X{122666A9-2995-4E47-A75E-6423A827B7AF} /qn REBOOT=REALLYSUPRESS
MsiExec.exe /X{18EF001B-B005-46CB-917B-112BA69ED85E} /qn REBOOT=REALLYSUPRESS
MsiExec.exe /X{1AE53ECE-2255-4191-998B-07741E5EFCDA} /qn REBOOT=REALLYSUPRESS
MsiExec.exe /X{33E712C1-2183-421C-9BC8-C902DB9C596C} /qn REBOOT=REALLYSUPRESS
MsiExec.exe /X{45FD01F4-B11B-4A58-B465-1D600B5CDF64} /qn REBOOT=REALLYSUPRESS
MsiExec.exe /X{4CB4741A-20C1-454E-8276-993D06A76D67} /qn REBOOT=REALLYSUPRESS
MsiExec.exe /X{50EF2C72-95EC-4206-AAC3-9E84004A6140} /qn REBOOT=REALLYSUPRESS
MsiExec.exe /X{5A18ABE3-52D1-4CA5-9169-25EC7E789582} /qn REBOOT=REALLYSUPRESS
MsiExec.exe /X{8D7B279C-A661-465C-9658-F62FBD6A6B91} /qn REBOOT=REALLYSUPRESS
MsiExec.exe /X{9074E264-F615-4DDE-969E-1FDBCFEC3FB5} /qn REBOOT=REALLYSUPRESS
MsiExec.exe /X{90881C8E-6C4F-4662-9923-85AFCA058C44} /qn REBOOT=REALLYSUPRESS
MsiExec.exe /X{9DD6B149-CEBC-4910-B11A-242393EDF6D3} /qn REBOOT=REALLYSUPRESS
MsiExec.exe /X{D793D5B1-A985-4443-90F4-E55A13CFF117} /qn REBOOT=REALLYSUPRESS
MsiExec.exe /X{E98E94E2-12D1-48E5-AC69-2C312F466136} /qn REBOOT=REALLYSUPRESS
MsiExec.exe /X{806422F1-FC4E-4D7C-8855-05748AEFC031} /qn REBOOT=REALLYSUPRESS
MsiExec.exe /X{27130E51-9555-408B-8134-7BFF54EDE27B} /qn REBOOT=REALLYSUPRESS
MsiExec.exe /X{3ED468C2-2235-4747-90AD-A7A34F0FE70A} /qn REBOOT=REALLYSUPRESS
taskkill /im SupportAssistAgent.exe /f /t
net stop SupportAssistAgent
sc delete SupportAssistAgent
rd "C:\Program Files\Dell\SupportAssist"/s /q
rd "C:\Program Files\Dell\SupportAssistAgent" /s /q
reg delete "HKLM\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\PC-Doctor for Windows" /f
del "C:\Users\Public\Desktop\SupportAssist.lnk" /f /q

来源: https://community.spiceworks.com/topic/2229972-using-pdq-deploy-to-uninstall-dell-supportassist https://www.dell.com/community/SupportAssist-for-PCs/Silently-Update-SupportAssist-in-background/td-p/7294483

答案 2 :(得分:0)

您是否尝试过以下方法:

get-package *dell* | uninstall-package -whatif

答案 3 :(得分:0)

我知道这是一篇旧帖子,但我只是在寻找一个脚本来执行此操作并最终编写了自己的 Powershell 脚本。

这是我想出来的。。 卸载“Dell SupportAssist”和“Dell SupportAssist OS Recovery Plugin for Dell Update” 希望这对其他人也有帮助.. 代码可能会被清理或简化一点,但它对我有用。


$supportassist = Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall| Get-ItemProperty | Where-Object {$_.DisplayName -ceq "Dell SupportAssist" } | Select-Object -ExpandProperty UninstallString
if ($supportassist)
{
    $arguments = $supportassist.substring(12) + " /qn REBOOT=REALLYSUPRESS"
    echo "Uninstalling Dell SupportAsist"
    echo "msiexec.exe " $arguments
    (Start-Process "msiexec.exe" -ArgumentList $arguments -NoNewWindow -Wait -PassThru).ExitCode
}

$supportassist2 = Get-ChildItem -Path HKLM:\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall| Get-ItemProperty | Where-Object {$_.DisplayName -ceq "Dell SupportAssist OS Recovery Plugin for Dell Update" } | Select-Object -ExpandProperty UninstallString
if ($supportassist2)
{
    $arguments2 = $supportassist2.substring(12) + " /qn"
    echo "Uninstalling Dell SupportAssist OS Recovery Plugin for Dell Update"
    echo "msiexec.exe " $arguments2
    (Start-Process "msiexec.exe" -ArgumentList $arguments2 -NoNewWindow -Wait -PassThru).ExitCode
}