The latests Exchange health check had an interesting addition – identification of deprected exchange groups.
The link that MS provide to get more detail on this doesnt really give any more detail on this…. so i went searching and found https://rafaelpfister.ch/blog/exchange-security-updates-juli-2026 which provides some interesting info – but doesn’t really go into what to check before removing those groups and how to clean up afterwards.
In short, the groups were deprecated around the 2007 timeframe – but subsequent Exchange installs dont actively remove them – so many orgs will still have them there…. and… i get it..
While im a huge fan of keeping things clean and deleting un-used groups, accounts, SIDHistory, foreign security principals etc etc… and AD recycle bin makes this much easier to recover from an accident… its still exchange… so many people err on the side of caution.
I think its great that this has been provided in the script – but, it doesnt provide enough information on what the security issue is, what impacts removing the groups could have and how to check… so, thats where i come in i guess… well, until AI scrapes this page and presents my work as its own.
Tools i’ll be talking about
Exchange Health check script – https://aka.ms/ExchangeHealthChecker
AD ACL scanner by Canix1 – The best ACL scanner for AD im aware of – https://github.com/canix1/ADACLScanner
Excel – i hope i dont need to explan what excel is
The security issue
For many of us running hybrid exchange, we have had Exchange in our forests since Exchange 2000 or there abouts – and have been through many iterations of both AD and Exchange… and generally part due to this, are likely to be running the exchange shared permissions model – and not the split permnissions model introduced in Exchange 2010 SP1 (from memory).
The split permissions model was always interesting to me in that if you moved over to it after being on the shared permissions model, you then had to go back and remove the permissions from the exchange groups – not a task to be taken lightly. If you were setting up a new forest after 2010 SP1 – then it was much easier.
Anyhoo – the guts of it is – that Exchange related groups have permission all through AD in the shared permissions model – and if you haven’t done it already, i suggest you use AD ACL scanner to have a look for yourself.
Things to check prior to deleting the AD groups that the healthcheck script recommends
Assuming the health checker script has come back with something similar to the following :
Legacy Exchange Security Groups: True
DistinguishedName Scope Members
—————– —– ——-
CN=Exchange Domain Servers,CN=Users,DC=company,DC=com Global 0
CN=Exchange Enterprise Servers,CN=Users,DC=company,DC=com DomainLocal 1
CN=Exchange Recipient Administrators,OU=Microsoft Exchange Security Groups,CN=Users,DC=company,DC=com Universal 1
These legacy Exchange security groups are not used by modern Exchange and carry elevated AD permissions. As a security best practice, review their membership and delete them if they are no longer required. More Information: https://aka.ms/HC-LegacyExchangeGroups
You could put your cowboy boots on and just delete them… but… pretending that we are enterprise tech’s – lets actually see where they are in use first.
Check 1 – AD
Using ADL ACL Scanner, run a scan with the following options
- Connect to the top level of your domain (if you have a resource domain or forest root domain, run this on each domain – just in case)
- Scan depth : subtree
- Output : csv file
- Optional – Tick “Inherited permissions” if you havent done this before so you can understand the depth these apply at.
In large enviornments it will take quite a while…. and for most orgs, you would expect the permissions to be allocated at the top level and inherited.
Once you have the SCV, you can filter and search.
I prefer to
- Use auto filter to filter the inherited column to “False”
- Filter the “trustee” column to “Exchange”
Now you can see the exchange related permissions in your AD.
As far as what you are looking for – the specific permissions given to the groups that the health checker script identified as deprecated.
In my enviornment i had the following
| ObjectClass | Trustee | Access | Inherited | Apply To | Permission |
| domainDNS | Company\Exchange Enterprise Servers | Allow | FALSE | This Object Only | ReadControl |
| domainDNS | Company\Exchange Enterprise Servers | Allow | FALSE | This object and all child objects | ListChildren |
| domainDNS | Company\Exchange Enterprise Servers | Allow | FALSE | This object and all child objects | Write All Properties displayName |
| domainDNS | Company\Exchange Enterprise Servers | Allow | FALSE | This object and all child objects | Write All Properties Exchange Information |
| domainDNS | Company\Exchange Enterprise Servers | Allow | FALSE | This Object Only | ExtendedRight Manage Replication Topology |
| domainDNS | Company\Exchange Enterprise Servers | Allow | FALSE | This object and all child objects | Write All Properties Public Information |
| domainDNS | Company\Exchange Enterprise Servers | Allow | FALSE | This object and all child objects | Write All Properties groupType |
| domainDNS | Company\Exchange Enterprise Servers | Allow | FALSE | This object and all child objects | Write All Properties Personal Information |
| domainDNS | Company\Exchange Enterprise Servers | Allow | FALSE | Descendant inetOrgPerson objects | Read Permissions,List Contents,Read All Properties,List |
| domainDNS | Company\Exchange Enterprise Servers | Allow | FALSE | Descendant user objects | Read Permissions,List Contents,Read All Properties,List |
| domainDNS | Company\Exchange Enterprise Servers | Allow | FALSE | Descendant group objects | GenericRead, WriteDacl |
| organizationalUnit | Company\Exchange Enterprise Servers | Allow | FALSE | This object and all child objects | ListChildren |
| organizationalUnit | Company\Exchange Enterprise Servers | Allow | FALSE | Descendant group objects | GenericRead, WriteDacl |
| organizationalUnit | Company\Exchange Enterprise Servers | Allow | FALSE | This object and all child objects | Write All Properties groupType |
| organizationalUnit | Company\Exchange Enterprise Servers | Allow | FALSE | Descendant user objects | Read Permissions,List Contents,Read All Properties,List |
| organizationalUnit | Company\Exchange Enterprise Servers | Allow | FALSE | This object and all child objects | Write All Properties displayName |
| organizationalUnit | Company\Exchange Enterprise Servers | Allow | FALSE | Descendant inetOrgPerson objects | Read Permissions,List Contents,Read All Properties,List |
| organizationalUnit | Company\Exchange Enterprise Servers | Allow | FALSE | This object and all child objects | Write All Properties Exchange Information |
| organizationalUnit | Company\Exchange Enterprise Servers | Allow | FALSE | This object and all child objects | Write All Properties Public Information |
| organizationalUnit | Company\Exchange Enterprise Servers | Allow | FALSE | This object and all child objects | Write All Properties Personal Information |
no entries for
Exchange Domain Servers
Exchange Recipient Administrators
Check 2 – Exchange
Just because these groups havent been specifically used by Exchange for a long time, doesnt mean that an admin hasnt granted them some type of custom role in Exchange.
To check this you can use
Get-ManagementRoleAssignment | Select-Object Name, Role, RoleAssignee, RoleAssigneeType
an depending on the size of the list, also pipe it out to a csv to be able to search/filter – e.g.
Get-ManagementRoleAssignment | Select-Object Name, Role, RoleAssignee, RoleAssigneeType | Export-Csv C:\Temp\ExchRoles.csv
If any of the groups are used here – you can the role update them appropriately.
Removing the groups
I initially started writing the various options for removal, but i got rid of that, as i really think there is only one way to go :
Empty, then Delete – with AD recycle bin as your fall-back position
Assuming you have AD recycle bin enabled, you can
- Empty the AD groups specified by the healthcheck script and wait for screams or issues
- Wait for a time period – say 4 weeks
- Ensure the on-prem exchange server(s) are rebooted at least ocne during this period
- Delete the deprecated groups specified by the healthcheck script (either one at a time or all at once)
- Wait for a time period – say 4 weeks
- Ensure the on-prem exchange server(s) are rebooted at least ocne during this period
- Assuming there are no issues, manually delete the now dead SID’s from the AD permissions structure <This is the step that is hard to recover from once done>
- If there are any issues you can
- Re-populate the groups
- or
- Recover the groups from AD recycle bin for up to 6 months
This approach doesn’t remove the permissions in the directoy – which are very finnicky to add back in should something go wrong – so its the approach i prefer.
Experience
Have i done this yet? No… not in prod at least… but i have in test with no issues.
I do expect to do this in prod over the next 2 months.
I dont image there many of us hybrid Exchange admins left – or at least those of us that started off doing MSMail to Exchange 4.0 migrations – so feel free to get in contact if you think i have got something wrong or have some clarifications to point out.
