The Get-CMDeviceCollectionExcludeMembershipRule cmdlet retrieves the rules that exclude the members of another collection from the device collections where the rule is applied.
You can specify the device collections where the rule is applied by name, ID, or an object that represents the collections.
You can specify the collection whose members are excluded by name, ID, or an object that represents the collection.
Microsoft System Center Configuration Manager dynamically updates the membership of the device collection on a schedule if the membership of the excluded collection changes.
For more information about membership rules, see Introduction to Collections in Configuration Manager on TechNet.
Example 1: Get the exclude membership rules from a device collection