Remove Visual C++ Redistributables from Microsoft Intune
Remove-VcIntuneApplication automates the removal of Visual C++ Redistributable Win32 applications from Microsoft Intune. It matches applications in Intune based on the provided VcList and removes them using the IntuneWin32App module.
Features
- Removes Win32 applications for Visual C++ Redistributables from Intune
- Accepts a VcList object (from
Save-VcRedist) to identify which apps to remove - Supports
-WhatIfand-Confirmfor safe operation - Provides verbose output for tracking removals
Prerequisites
- The IntuneWin32App PowerShell module must be installed and imported
- You must be authenticated to Intune with
Connect-MSIntuneGraph - A valid Microsoft Graph API access token must be present
Parameters
VcList(required): An array of Visual C++ Redistributable objects, typically fromSave-VcRedist. Used to match and remove corresponding Intune applications.
Example Usage
powershell
# Get the list of redistributables you want to remove
$VcList = Get-VcList -Release "14" | Save-VcRedist -Path C:\Temp\VcRedist
# Remove the corresponding Intune applications
Remove-VcIntuneApplication -VcList $VcList -Verbose -Confirm:$falseTip: Use
-WhatIfto view which applications would be removed from Intune.
How It Works
- Retrieves existing Visual C++ Redistributable Win32 apps in Intune using
Get-VcRedistAppsFromIntune - For each matched application, calls
Remove-IntuneWin32Appto remove it from Intune - Supports PowerShell's
ShouldProcessfor-WhatIfand-Confirmsafety
Troubleshooting
- Missing modules: Ensure
IntuneWin32Appis installed and imported - Authentication errors: Authenticate with
Connect-MSIntuneGraphand ensure$Global:AccessTokenis set - No matching apps: Ensure your
VcListmatches the apps you want to remove
