Closed JerHowden closed 3 years ago
The same also happens with Get-WinADGroupMember
I always assumed that using @ in the name means you are dealing with UPN. I was not aware people will use @ in the Name causing DN having @ sign. I was not aware it's possible to use @ in UPN as well but it seems T@ta@domain.pl is valid UPN, which complicates a lot of my scripts logic.
It is unfortunate that this naming scheme is accepted. For the Member and MemberOf scripts, would it be possible to pass along the domain name parameter in order to skip this check altogether?
I'll just have to fix - instead of doing like @ i will first check if it's DistiniguishedName and then if not go further. I have some ideas. Just need some time.
This line in Get-WinADGroupMemberOf passes the Identity parameter to Get-WinADObject
https://github.com/EvotecIT/ADEssentials/blob/d316cc9a26ee79f10ddf82796d09b10555fc6677/Public/Get-WinADGroupMemberOf.ps1#L25
And with an @ symbol this breaks here in Get-WinADObject
https://github.com/EvotecIT/ADEssentials/blob/d316cc9a26ee79f10ddf82796d09b10555fc6677/Public/Get-WinADObject.ps1#L164