Powershell to add text to an active directory field for set of users

Darryl 51 Reputation points
2023-03-21T10:01:25.6433333+00:00

Could someone help or point me in the right direction to do the following in PS please?

I need to put populate a field in AD with some txt which will be the same text for a group of users, it needs to add the text to all members of a particular group/

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
{count} votes

2 answers

Sort by: Most helpful
  1. Darryl 51 Reputation points
    2023-03-21T12:40:44.49+00:00

    ..........

    0 comments No comments

  2. Darryl 51 Reputation points
    2023-03-21T13:18:35.3366667+00:00

    I thought I had this worked out, these two commands work when there is one member of the group (when I was testing), but as soon as I add >1 it fails to run.

    $Names = Get-AdGroupMember -identity "Staff"

    Set-ADUser $Names -MobilePhone "Testing"

    Can anyone help with what I have done wrong please?

    0 comments No comments

Your answer

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