Skip to content

Add supersedence rules automatically #178

@alexhass

Description

@alexhass

Expected Behavior

If I'm updating our VC packages in intune, the previous versions should be automatically updated.

Current Behavior

Previous versions are not automatically superseded with "update" mode.

Run this before the import:

$Win32AppPackagePreviousSearch = 'Microsoft Visual C++ Redistributable for Visual Studio 2022 * x64'
$Win32AppPackagePreviousVersions = Get-IntuneWin32App -DisplayName $Win32AppPackagePreviousSearch
$Win32AppPackagePreviousVersions | fl id, displayName

And this after the import:

# Add supersedence rules for all previous app versions
$SupersedenceRules = @()
$Win32AppPackagePreviousVersions | ForEach-Object {
	$SupersedenceRules += New-IntuneWin32AppSupersedence -ID $_.id -SupersedenceType 'Update'
}
Add-IntuneWin32AppSupersedence -ID $Win32App.id -Supersedence $SupersedenceRules

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions