WEBVTT

00:00.420 --> 00:06.600
Previously we've learned how to Abdou develop of description use and power show.

00:06.600 --> 00:12.060
Now let's take a look at updating telephone numbers of multiple users.

00:12.060 --> 00:18.090
This operation is a little different from updating the description of operation here.

00:18.140 --> 00:21.860
They have two complexities which are as follows.

00:21.900 --> 00:29.430
The first one we don't know which attribute will get updated when a number is added to the telephone

00:29.430 --> 00:33.450
number field and the graphical user interface.

00:33.510 --> 00:42.270
And the second complexity is performing a telephone number obtained from multiple users by reading from

00:42.270 --> 00:45.560
a text file or CSP file.

00:45.570 --> 00:50.180
First we need to identify attributes that need to be updated.

00:50.220 --> 00:58.130
So when we want to update that office telephone number home number and my Bible number of the users

00:58.410 --> 01:08.520
if this users already have this number set then we can use the attribute editor to identify the attribute

01:08.520 --> 01:11.070
names that need to be updated.

01:11.100 --> 01:19.740
If not then we need to say that these telephone numbers for one user account and land use attribute

01:19.830 --> 01:23.440
editor to identify the attribute names.

01:23.520 --> 01:33.210
Alternatively you can use that get a user come and lead to retrieve all attributes the Power Shell is

01:33.210 --> 01:37.540
preferred here as we want to learn more and more about it.

01:37.740 --> 01:45.120
Let's examine the output of the following command carefully and identify the attribute names that have

01:45.120 --> 01:49.800
their telephone numbers you see in the graphical user interface.

01:49.800 --> 02:00.090
So first let's run this command get a user identity Tom call Carl so mandrill be looking for all the

02:00.090 --> 02:03.110
properties of this object.

02:03.120 --> 02:10.160
You'll notice that the following command have the telephone number you see in the graphical user interface

02:10.350 --> 02:15.810
and it outputs too much information which you don't need right now.

02:15.810 --> 02:20.370
So we could select some properties we need right now.

02:20.490 --> 02:29.580
So let's run this command again as pipe and select home phone office phone and my bile form the description

02:29.580 --> 02:37.440
of the Presidium command is shown in the foreign office phone this attribute contains the phone number

02:37.440 --> 02:44.790
that you see on there under the main field and telephone numbers in Active Directory administrative

02:44.790 --> 02:48.530
center an Active Directory Users some computers.

02:48.530 --> 02:55.200
You'll see this number in the telephone number field in the general term home phone.

02:55.200 --> 03:00.600
This is the phone number you will see in the home phone field and more biol.

03:00.690 --> 03:05.420
This attribute contains the phone number you see in the mobile field.

03:05.550 --> 03:12.610
First let's update the telephone details so while you are there then we can extend the logic.

03:12.630 --> 03:15.430
Did other users in Baalke.

03:15.810 --> 03:18.890
Let's talk the numbers in variables.

03:18.890 --> 03:25.650
First let's grade three variables for office number home number and mobile number.

03:25.710 --> 03:27.980
The first variable will contain.

03:28.150 --> 03:35.250
Sorry will be named Dolor character office number and will be equal to the number we need.

03:35.280 --> 03:38.910
Then we will have home number and my Bible number wearables.

03:38.910 --> 03:45.830
The next step is to update the Presidium values for a user account as shown in this command set.

03:45.870 --> 03:54.810
Daresay the user has the following properties identity office phone which will get the wearable of office

03:54.810 --> 03:58.250
number home phone mobile phone.

03:58.260 --> 04:05.460
This is a straight forward because the set does say the user command Let has parameters that can set

04:05.550 --> 04:13.260
these phone numbers in the attribute that you are trying to set is not available as a parameter to the

04:13.260 --> 04:14.410
command left.

04:14.460 --> 04:23.700
Then you can use the dash add parameter to directly specify the attribute name and the value.

04:23.700 --> 04:34.050
Similarly you can use the parameter such as Desch replace and dash clear parameter to the Chris attributes

04:34.070 --> 04:35.040
directly.

04:35.200 --> 04:40.380
The Bruce that an example can be rewritten using their deaths add parameter.

04:40.500 --> 04:43.700
So let's review this command cert.

04:43.710 --> 04:51.120
There's a user again with identity parameter and clear parameter.

04:51.150 --> 04:56.910
So real quickly are telephone number home phone and mobile.

04:57.060 --> 05:05.060
And again we'll run the full and that a user's identity and at the following parameters.

05:05.100 --> 05:14.550
So telephone number will be equal to office number Meribel home phone number and my bile to my biol

05:14.550 --> 05:16.080
number variable.

05:16.080 --> 05:24.910
Now we can extend this logic to multiple users use an hour for looping power shell before doing this.

05:24.990 --> 05:33.990
Store the user names and numbers of want to set in a specific file and imported into power shell.

05:33.990 --> 05:37.420
So I have the for unsisterly file.

05:37.500 --> 05:46.770
Let me open it and show you the values of this file and the code to set the telephone numbers will look

05:46.770 --> 05:55.140
like that Rillette variable and other variable users which will be equal equal to the full and command

05:55.240 --> 06:03.390
imperf. says the command left and the file in which you have all the telephone numbers which you want

06:03.390 --> 06:05.730
to add to your users.

06:05.830 --> 06:15.460
Then for each user in this file which is equal to users wearable fill out the form in code below your

06:15.500 --> 06:25.100
set there's a D command left with identity property which will be equal to user with username property

06:25.440 --> 06:34.290
office phone will be equal to office number variable which we've said before and the same goes for home

06:34.290 --> 06:36.770
phone and mobile phone.

06:36.850 --> 06:48.450
Now check one of these users let's say Jondo in a Users and Computers console and see if his phone number

06:48.750 --> 06:50.220
is the one we need.

06:50.430 --> 06:58.620
That's open Users and Computers console right click on the domain and search for the name John Allen

06:58.910 --> 07:01.870
and his properties in general.

07:02.000 --> 07:09.910
We can find the phone number it can do the same years in Active Directory administrative center.

07:09.960 --> 07:15.700
Again we click right click on the demand and search for the name John.

07:15.720 --> 07:21.330
And here we have all three numbers which we've modified before.

07:21.360 --> 07:29.580
Also if you scroll down to the bottom you'll you could find this attributes all the attributes which

07:29.880 --> 07:35.430
could be used to modify this object this user object.
