Share via

Active Directory Mail-enabled Security group

Sophia 366 Reputation points
2021-04-28T17:28:18.117+00:00

Is there a way from me to populate ADUser Attribute (Company ) for the members of a security group using powershell.

Thanks,

Windows for business | Windows Client for IT Pros | Directory services | Active Directory
Windows for business | Windows Server | User experience | PowerShell
0 comments No comments

2 answers

Sort by: Most helpful
  1. Anonymous
    2021-04-29T03:21:51.52+00:00

    Hi,

    You can try this

    Get-ADGroupMember $group | Set-ADUser -Company "ABC"  
    

    Best Regards,
    Ian Xue

    ============================================

    If the Answer is helpful, please click "Accept Answer" and upvote it.
    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

    Was this answer helpful?

    0 comments No comments

  2. Sophia 366 Reputation points
    2021-04-28T17:58:17.823+00:00

    this is what i'm working with:

    get-ADGroup " GroupName" | sort -property Company | foreach { set-ADUser $_ -Company ABC}.

    Is that correct?

    Was this answer helpful?

    0 comments No comments

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.