Forum Discussion
chozin78
Jun 16, 2022Copper Contributor
Dynamic DL Exclusion
I am trying to exclude certain members in AD that belong to a specific company. It doesn't appear to work when I filter using the objects below: Example -and (Company -ne 'Company A*'))
VasilMichev
Jun 20, 2022MVP
Use -notlike then. Or if you want to use a single value, -ne will also do (without the wildcard).
chozin78
Jun 20, 2022Copper Contributor
I tried this today and no users populated. What am I missing here?
-and (-not(Company - like 'Company A')
- VasilMichevJun 20, 2022MVPLooks OK to me, but post the full filter just in case. Also, if you are checking via Get-DynamicDistributionGroupMember, it takes some time for membership to be calculated.