I use PowerShell script to uninstall software, remove services and delete installation folder. Full clean up. This software has core app and 11 addins. So I use this code for addins:
$appAddIns = @(Get-WmiObject -Class Win32_Product | Where-Object { $_.Name -match "SE0008*" })
foreach ($appAddIn in $appAddIns)
{
Write-Host "Uninstalling: " $appAddIn.Name
$appAddIn.Uninstall() | out-null
}
But it's terribly slow to even start the script. I run it, and it's just blank. My colleague at work didn't use my script because after 10 seconds he assumed that it doesn't work and terminated it.
Is there any way to write it better, or just add:
Write-Host "Sit and wait you impatient bastard"
at the beginning?