Share via

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

Darryl 51 Reputation points
Mar 21, 2023, 10:01 AM

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,929 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,628 questions
0 comments No comments
{count} votes

2 answers

Sort by: Most helpful
  1. Darryl 51 Reputation points
    Mar 21, 2023, 12:40 PM

    ..........

    0 comments No comments

  2. Darryl 51 Reputation points
    Mar 21, 2023, 1:18 PM

    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.