You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm trying to run an export of resource AADGroup with -Filters @{AADGroup = "NOT groupTypes/any(s:s eq 'Unified')"} in order to ignore M365-groups since I want to extract only security-groups that must be present
This filter - the presence of NOT - requires parameters -Consistencylevel Eventual -CountVariable to be present in the call to Get-MgGroup
However, the logic in the resource will include these parameters only if the filter includes tests for null or endswith (line 1283)
I've tried adding '-or $Filter -like "not"' and then the export works as expected.
I'm raising the issue because the -Filter parameter is used in multiple resources and a similar update could be required more or less all over the place.
Ideally, create a separate function called by Export-TargetResource everywhere that adds extra parameters regardless of resource. Then rules for when to append extra parameters can be confined to a single function.
Hopefully someone has the skills to do a 'general update' in either way without incurring instant arthritis.
Microsoft 365 DSC Version
DEV
Which workloads are affected
Azure Active Directory (Entra ID)
The DSC configuration
(export)
Verbose logs showing the problem
Environment Information + PowerShell Version
Windows PS 5.1
The text was updated successfully, but these errors were encountered:
There are 135 resources that support -Filter in Export-TargetResource. I know I could update AADGroup and leave it at that but I'm trying to 'see the big picture'.
Description of the issue
I'm trying to run an export of resource AADGroup with -Filters @{AADGroup = "NOT groupTypes/any(s:s eq 'Unified')"} in order to ignore M365-groups since I want to extract only security-groups that must be present
This filter - the presence of NOT - requires parameters -Consistencylevel Eventual -CountVariable to be present in the call to Get-MgGroup
However, the logic in the resource will include these parameters only if the filter includes tests for null or endswith (line 1283)
I've tried adding '-or $Filter -like "not"' and then the export works as expected.
I'm raising the issue because the -Filter parameter is used in multiple resources and a similar update could be required more or less all over the place.
Ideally, create a separate function called by Export-TargetResource everywhere that adds extra parameters regardless of resource. Then rules for when to append extra parameters can be confined to a single function.
Hopefully someone has the skills to do a 'general update' in either way without incurring instant arthritis.
Microsoft 365 DSC Version
DEV
Which workloads are affected
Azure Active Directory (Entra ID)
The DSC configuration
Verbose logs showing the problem
Environment Information + PowerShell Version
Windows PS 5.1
The text was updated successfully, but these errors were encountered: