Skip to content

get-openadgroup, get-openadobject etc. identity parameter defaults to distinguishedName #90

@conroyd-ohsu-edu

Description

@conroyd-ohsu-edu

Not sure if I'm missing something here.
I tried the following:

$groupname = "atl-usercategory-itg_employees"
Get-OpenADGroup -Session $session -identity $groupname

and I get a response stating that it can't find the object using a filter that makes use of the distinguishedName property:

Cannot find an object with identity filter: '(&(objectCategory=group)(distinguishedName=atl-usercategory-itg_employees))'

If I change the group name by removing the _employees part at the end, it correctly searches via samAccountName

$groupname = "atl-usercategory-itg"
Get-OpenADGroup -Session $session -identity $groupname

It seems that when there's an underscore in the group name, it incorrectly switches to using distinguishedName.

Is there any way I can force it to use samAccountName, without writing out the ldap filter myself?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions