Skip to content

Get-UsersFromGroup count issue #5

@jimfieldTarter

Description

@jimfieldTarter

If there is only 1 member of a group the $ADPrivGroupItemGroupMembership.count will not work correctly. I had to change to measure the object first.

$ADPrivGroupItemGroupMembership = Get-ADGroupMember $GroupName -Server $DomainDC
$tCount = ($ADPrivGroupItemGroupMembership | Measure-Object).Count
if ($tCount -ge 1) {

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions