$log = '/l*v $env:windir\temp\uninstall_$packagename.log' $packagename = $packagename -replace '\s','' Write-Host 'No applcations Found Exiting with code 0'įor ($i=0 $i -lt $AppArray.Length $i++) Set-ItemProperty -Path $DetectKey -Name Array -Value 'NoneFound' -Force $InstalledProducts = Get-WmiObject -Namespace 'root\cimv2\sms' -Class SMS_InstalledSoftware Usually to script a removal I can easily jump into the SMS software class and find all relevant entries to a specific software version and build the script from there. Unfortunately the Client had a huge variety of Versions of one specific piece of software, ranging from 4.1 to 4.3 with loads of revisions in the middle and it installed 3 products! If you have no idea what I’m talking about take a look at this post and it will come clear! Use SCCM or MDT to Uninstall all applications by a specific publisher or other unique ID using the SMS installed software class in WMI and PowerShell.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |