For one of our client we have onboarded 500+ custom detection rules in Microsoft Defender, as they were migrating from another EDR solution to Defender. Now client ask is, they have created a new device group/organizational scope for testing rules and for all 500+ rules they are expecting us to change the device group as the new one they have onboarded now.
Is there any way we can change or update the device group/organizational scope in one go for all 500+ rules, any PowerShell script or automation that can help us achieve this?