Get-AdmPrincipalGroupMembership
always throws an exception, even for users which absolutely exist (eg: piped directly from Get-AdmUser
)
Example
Get-AdmPrincipalGroupMembership -Identity 'Test.User' -AdaxesService localhost
Get-AdmPrincipalGroupMembership : The given key was not present in the dictionary.
...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [Get-AdmPrincipalGroupMembership], KeyNotFoundException
+ FullyQualifiedErrorId : Softerra:Adaxes:PowerShellModule:Commands:GetAdmPrincipalGroupMembershipCommand:ProcessRecord,Softerra.Adaxes.PowerShellModule.Commands.GetAdmPrincipalGroupMembershipCommand