RedditPP Mascot

RedditPP

r/sysadmin • … • u/SAINT_XIII

Powershell assistance - mass changing user attribute

Hi!

We're currently working on our new communications platform - for our UC solution all AD users to have an attribute, let's call it Number1, to be filled with their phone number.

Here's the catch - the phone number field currently displays the entire phone number, including the area code. Internal phone numbers are 4 digits and we do use a 2 digit prefix for our sites to enable cross-site calling. Prefix 01 e.g is for Site 01, and so on.

Our UC solution now needs Number1 to be filled with 6 digits, meaning our prefix and our actual phone numbers.

​

Is there a way using powershell (or whatever for that matter) to automatically fill all users Number1 and automatically check for their site and add their prefix?

​

Thank you!

— 0