maester icon indicating copy to clipboard operation
maester copied to clipboard

Test-MtCaExclusionForDirectorySyncAccount errors out when Directory Synchronization Accounts has no members.

Open franciso opened this issue 1 year ago • 2 comments

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.

franciso avatar Jun 06 '24 14:06 franciso

The fix is to use Get-ObjectPropertyValue function (which checks if the property exists and returns a null otherwise).

merill avatar Aug 04 '24 22:08 merill

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.

slueders-bag avatar Oct 03 '24 09:10 slueders-bag