12/30/2023 0 Comments Powershell uninstall softwareYou've had comments and an answer that wasn't relevant because of this. Exiting with code 3010 for reboot.In the future include any code you've tried, even if it doesn't work! Just listing the names of the commands you tried isn't very useful as we can't see what you're doing so have to guess. ![]() Write-Host 'Applcations Found and removed. Set-ItemProperty -Path $DetectKey -Name $packagename -Value 'ExitCode: $ExitCode' -Force ![]() $Passthru = Start-Process 'msiexec.exe' -ArgumentList $arguments -Wait -NoNewWindow -PassThru $arguments = '/x ' + $AppArray.Localpackage + ' /qn /norestart $log' $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 |