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

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,419 questions
Windows Server PowerShell
Windows Server PowerShell
Windows Server: A family of Microsoft server operating systems that support enterprise-level management, data storage, applications, and communications.PowerShell: A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
5,504 questions
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.