Share via

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

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

Answer accepted by question author

Rich Matheisen 48,116 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
    }

Was this answer helpful?

1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

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.