# Get all dell software $dellSoftware = Get-WmiObject -Class Win32_Product | Where-Object Name -Match Dell #| Format-Table # Uninstall all Dell software except Power Manager foreach ($software in $dellSoftware) { if ($software.Name -ne "Dell Power Manager Service") { & msiexec /x $software.IdentifyingNumber | Out-Null } }