Hi i am new to powershell and my skill extends to some one liners but most of the time i copy a script test and then use and amend it.
i have been trying to uninstall the software below which i have been able to with two pieces of script the last remaining software is dell optimizer which i finding difficulty to find any any script for this
these are the package names
Get-Package “Dell Optimizer”
Get-Package -name “Dell Optimizer”
Get-Package -name “Dell Command”
Get-Package -name “Dell SupportAssist Remediation”
Get-Package -name “SupportAssist”
Get-Package -name “Dell Power Manager Service”
Get-Package -name “Dell Digital Delivery Services”
Get-Package -name “Dell OptimizerUI”
Get-Package -name “SupportAssist OS Recovery Plugin for Dell Update”
I used this get-package to uninstall: Dell command Dell power mananager Dell digital Services
Get-Package -Name “packagenamehere” | Uninstall-Package this worked for some fo the dell software
I have had to use this command to uninstall the dell Support assist as the get package uninstall did not work.
$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
}
}
I am now on the software called Dell optimizer I tried to change the name in the script above but that removes the dell support assist but it doesn’t work.
found the UninstallString and name by trying to remove using the HKLM:
$unins = Get-ChildItem “HKLM:\SOFTWARE\WOW6432Node\Microsoft\Windows\CurrentVersion\Uninstall” -ErrorAction SilentlyContinue | Get-ItemProperty | Where-Object {$_.DisplayName -Like “Dell Optimzer”} | Select Displayname, Uninstallstring
and then using this $unins which displays the uninstall string
DisplayName UninstallString
Dell Optimizer Service “C:\Program Files (x86)\InstallShield Installation Information{286A9ADE-A581-43E8-AA85-6F5D58C7DC88}\DellOptimizer.exe” -remove -runfromtemp
Next i ran Start-Process -FilePath $Unins.Uninstallstring -ArgumentList “/S” -wait which doenst work i think its something to do with the uninstallstring but not sure how to amend or fix it.
any help would be great i was advise to split this but in didnt know wha that means at my stage in powershell i feel a little stupid but honest enough to ask for help