Powershell Command to replace value

Tarek Desoky 21 Reputation points
2023-11-13T08:09:44.6533333+00:00

Good day Dears,

Kindly i need to copy all my users ip phone (Which is their telephone Extenstion) to put it on another filed which is Home filed to all users using poweshell commands.

One Note each user have his IP phone so i need to copy each user ip phone to his home number to be matched where i need to apply it in all my organization.

Kindly check the attached file.Thanks

IP Phone .png

Active Directory
Active Directory
A set of directory-based technologies included in Windows Server.
6,706 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,572 questions
0 comments No comments
{count} votes

Accepted answer
  1. Rich Matheisen 47,306 Reputation points
    2023-11-13T16:18:21.5833333+00:00

    It might be a simple as this:

    get-aduser -filter * -properties homephone,ipphone |
        ForEach-Object{
            set-aduser $_.distinguishedname -HomePhone $_.ipphone
        }
    
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.