gpt4 book ai didi

powershell - 如何使用 powershell 卸载 dell support assist?

转载 作者:行者123 更新时间:2023-12-03 16:37:59 25 4
gpt4 key购买 nike

所以出现了一篇关于支持辅助易受攻击的文章,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*"}

我现在真的很讨厌支持辅助,我希望它死掉,但我已经束手无策了。

最佳答案

所以我遇到了完全相反的问题。我能够删除较新的版本,但是由于 UninstallString 返回“C:\显示(我有大约 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 及更早版本)展示的方法,看看是否能解决我的问题。希望我的代码片段对您有所帮助。干杯。

关于powershell - 如何使用 powershell 卸载 dell support assist?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56067312/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com