Forum Discussion
AndySB123
May 01, 2024Copper Contributor
Microsoft Azure Information Protection Uninstall Issue
We installed AIP installer to ~3000 machines and we deployed v2.13.49.0 to all of our machines last year and didn't upgrade it. We have since had a request in to remove it from all machines, this is ...
blayman67
May 08, 2024Copper Contributor
Have same issue, and after digging, I found that Microsoft is adding registry entries to AzInfoProtection.exe installers in the "C:\ProgramData\Package Cache" folder. So, I pulled the installers from those locations and packaged each to uninstall if the Cache folder is present with a requirement rule to check. The 2 versions most prevalent for my organization are 2.16.79 and 2.18.26. I'm targeting these for now, since I have those installers and will clean up the rest later.
Package Cache Folder Names:
2.16.79:
C:\ProgramData\Package Cache\{c01f4b1d-ef87-4ba5-8dcc-9781bd40da6d}
2.18.26
C:\ProgramData\Package Cache\{265aa462-28d4-4936-ac01-401a7d2e2be5}
Package Cache Folder Names:
2.16.79:
C:\ProgramData\Package Cache\{c01f4b1d-ef87-4ba5-8dcc-9781bd40da6d}
2.18.26
C:\ProgramData\Package Cache\{265aa462-28d4-4936-ac01-401a7d2e2be5}
- AndySB123May 08, 2024Copper Contributor
blayman67 Thanks! I also did a bit of digging and found the following on our estate.
Version GUID Package Cache 2.13.49.0 {7F9E039F-3B88-49C0-A464-5759331C6985} {231cba1f-1f89-4827-b80e-93ddc8856b3e} 2.14.90.0 {7175C307-79AA-44E0-A3CB-3016E32B1E17} {d23b4653-ca5a-4517-b2a4-e2edf9d22943} 2.16.73.0 {E771A2D8-44BB-47C5-8D2D-C54EAD014A25} {677ae234-9687-4c07-83c0-b3d5e191adb2} 2.16.79.0 {4AA2D7F5-CF37-48CF-8218-181322ED662A} {c01f4b1d-ef87-4ba5-8dcc-9781bd40da6d} 2.17.66.0 {6de718d8-4790-42a4-8f11-8b0158345c96} {6de718d8-4790-42a4-8f11-8b0158345c96} Then I created a script to look for each version and have recently deployed it to 200 and it worked totally fine. I put the script in the original deployment so was easier to send Uninstalls out via InTune.
The script also creates log files in C:\Temp with detailed actions what it has done. Hope it helps
######################## # Microsoft AIP ripout script # # Created by : ASB # Date: 02/05/24 # This script is only to be used for the ripout of AIP ######################## # GUIDs for the annoying first applications to be uninstalled and the linked GUIDs # versions in order below GUIDS are 2.13.49.0, 2.14.90.0, 2.16.73.0, 2.16.79.0, 2.17.66.0 $guids = @{ "7F9E039F-3B88-49C0-A464-5759331C6985" = "231cba1f-1f89-4827-b80e-93ddc8856b3e"; "7175C307-79AA-44E0-A3CB-3016E32B1E17" = "d23b4653-ca5a-4517-b2a4-e2edf9d22943"; "E771A2D8-44BB-47C5-8D2D-C54EAD014A25" = "677ae234-9687-4c07-83c0-b3d5e191adb2"; "4AA2D7F5-CF37-48CF-8218-181322ED662A" = "c01f4b1d-ef87-4ba5-8dcc-9781bd40da6d"; "B8F9AFA8-C1C2-4DCE-AF83-34349F9ADF0B" = "6de718d8-4790-42a4-8f11-8b0158345c96"; } # Log file location $logFile = "C:\Temp\AIPRemoval.log" # Old Loggy Logs function Log-Message { param([string]$Message) $timestamp = Get-Date -Format "dd-MM-yyyy HH:mm:ss" "$timestamp - $Message" | Out-File -Append -FilePath $logFile } # Start time $startTime = Get-Date Log-Message "Script execution started." # Loop through each GUID and attempt to uninstall foreach ($guid in $guids.Keys) { $startTimeGuid = Get-Date Log-Message "Processing GUID: $guid (Start Time: $startTimeGuid)" try { $uninstallString = "msiexec.exe /x {$guid} /qn /norestart" Log-Message "Preparing to execute uninstall command: $uninstallString" $output = Start-Process "cmd.exe" "/c $uninstallString" -Wait -PassThru -ErrorAction Stop Log-Message "Uninstall command executed - ExitCode: $($output.ExitCode)" if ($output.ExitCode -eq 0) { Log-Message "Uninstallation successful for GUID: $guid" # Check and run secondary uninstall command if primary was successful $linkedGuid = $guids[$guid] $secondaryUninstallPath = "C:\ProgramData\Package Cache\{$linkedGuid}\AzInfoProtection.exe" Log-Message "Checking for secondary uninstall executable at: $secondaryUninstallPath" if (Test-Path $secondaryUninstallPath) { $secondaryUninstallCmd = "`"$secondaryUninstallPath`" /uninstall /quiet /norestart" Log-Message "Executing secondary uninstall command: $secondaryUninstallCmd" $secondaryOutput = Start-Process "cmd.exe" "/c $secondaryUninstallCmd" -Wait -PassThru Log-Message "Secondary uninstall command executed - ExitCode: $($secondaryOutput.ExitCode)" } else { Log-Message "Secondary uninstall executable not found." } } else { Log-Message "Uninstallation failed for GUID: $guid - Exit Code: $($output.ExitCode)" } } catch { Log-Message "Exception occurred while uninstalling GUID: $guid - Error: $_" } $endTimeGuid = Get-Date $durationGuid = $endTimeGuid - $startTimeGuid Log-Message "Completed processing GUID: $guid (End Time: $endTimeGuid, Duration: $durationGuid)" } # End time and how long it took $endTime = Get-Date $totalTime = $endTime - $startTime Log-Message "Script execution completed." Log-Message "Total duration: $($totalTime.ToString())" # Write to the logs Log-Message "All operations have finished."