When running New-AzRemediationTasks -OnlyCheckManagedAssignments on a management group that contains policy assignments owned by another pacEnvironment, remediations will be run on the other environments policy assignments as well.
It looks like there was a mistake in the if statement in this file.
Also noticed a mistake in the comment so corrected that as well.
Have tested this locally and resolved the issue I was having.
When running
New-AzRemediationTasks -OnlyCheckManagedAssignments
on a management group that contains policy assignments owned by another pacEnvironment, remediations will be run on the other environments policy assignments as well.It looks like there was a mistake in the if statement in this file.
Also noticed a mistake in the comment so corrected that as well.
Have tested this locally and resolved the issue I was having.