Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add supersedence rules automatically #178

Open
alexhass opened this issue Jan 10, 2025 · 0 comments
Open

Add supersedence rules automatically #178

alexhass opened this issue Jan 10, 2025 · 0 comments

Comments

@alexhass
Copy link

alexhass commented Jan 10, 2025

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

@alexhass alexhass changed the title Add supersceedence rules automatically Add supersedence rules automatically Jan 10, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant