maester
maester copied to clipboard
Test-MtCaExclusionForDirectorySyncAccount errors out when Directory Synchronization Accounts has no members.
Line |
27 | … nAccountRoleId/members" -Select id | Select-Object -ExpandProperty id
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| Property "id" cannot be found.
Testing against a tenant that was previously synchronizing user with AADC.
The fix is to use Get-ObjectPropertyValue function (which checks if the property exists and returns a null otherwise).
had the same error in Version 0.3: Maester\0.3.0\public\Test-MtCaExclusionForDirectorySyncAccount.ps1:34:157 Line | 34 | … nAccountRoleId/members" -Select id | Select-Object -ExpandProperty id | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ | Property "id" cannot be found.