WEBVTT

00:00.450 --> 00:04.460
Add members to a group in the previous lessons.

00:04.520 --> 00:12.900
So how to create groups and Active Directory how to search for them and how to change group object information

00:13.200 --> 00:16.850
groups are useless without mamber send them.

00:16.950 --> 00:26.430
And this lesson will concentrate on how to add both user accounts and computer records to security groups

00:26.430 --> 00:34.290
and Active Directory like any other operation Active Directory module has a command lead to add members

00:34.290 --> 00:35.330
to groups.

00:35.430 --> 00:43.380
The get GROUP MEMBER command left does this for you to add a member to the group you're there at the

00:43.500 --> 00:47.520
group member command left with the member perimeter.

00:47.610 --> 00:54.430
Use the same account name of the member or user for reserve of addition.

00:54.480 --> 01:02.640
Add in a single user account to a security group is very straight forward with it at Desch a group member

01:02.830 --> 01:06.900
on the left as shown in the following command Ricka rank.

01:06.960 --> 01:11.960
We can run it add a the group member identity.

01:12.150 --> 01:15.990
We have to specify the group to which we are at.

01:15.990 --> 01:23.880
In the user in my case it's group one does read in quotes and members.

01:23.970 --> 01:27.320
In this case it's only one member Lepp user one.

01:27.330 --> 01:35.640
Multiple users can be added to security groups by passing their names to the members attribute as shown

01:35.640 --> 01:37.330
in the four in command.

01:37.470 --> 01:46.920
Let's run and add the group member identity group one read and members will at Lappe use are 1 2 and

01:46.920 --> 01:48.960
3 to this group.

01:48.990 --> 01:56.520
But if you want to add a single user to multiple groups at the same time this could be achieved also

01:56.520 --> 02:01.660
by using the following command which specifies the groups like group.

02:01.740 --> 02:05.910
Group one does read by bit to the following command.

02:05.980 --> 02:11.170
For each do this action add a group member.

02:11.200 --> 02:19.670
Identity is taken from the previous part of this command from the part before the pipe.

02:19.680 --> 02:26.270
In my case its test group and group one does read and we are reading the members.

02:26.280 --> 02:29.590
In my case it's only one member Lepp yours or three.

02:29.610 --> 02:36.780
So once again the precedent command will add the Lepp users 3 user account to the test group and group

02:36.790 --> 02:44.790
just read groups here reparse group name to their identity barometer of their age group member and left

02:45.090 --> 02:49.510
one after the other two at Lepp here there are three.

02:49.530 --> 02:57.780
One of the Kodmani use cases for system administrators is that they will have a list of users to be

02:57.780 --> 03:00.210
added in a text file.

03:00.210 --> 03:08.250
When you have such a requirement adding users to a specific group is as simple as the following command

03:08.530 --> 03:16.200
the add and you variable which is called user use and which is equal to contend come command layout

03:16.560 --> 03:21.950
and we are getting content from the file with the file in my case.

03:21.960 --> 03:32.160
Its users that txt file which is located on the C drive in peoples folder and after that we run the

03:32.160 --> 03:40.440
following command at a the group member the group to which we are at and so identity's test group and

03:40.520 --> 03:49.570
mamber with whom they are read into this group and we are using the variable we were added before users

03:49.590 --> 03:50.610
were able.

03:50.610 --> 03:58.260
Now let's see how to add all users from an organizational unit to a security group by using the following

03:58.260 --> 03:59.080
command.

03:59.250 --> 04:02.580
Again we are red and variable users.

04:02.670 --> 04:11.340
We are getting all active directory users from all app organizational unit so the command looks like

04:11.350 --> 04:21.420
that get the end user search base pass to the older you get the users from then we are filtering the

04:21.420 --> 04:28.210
results with filter parameter and we are filtering by the following property.

04:28.260 --> 04:31.800
Object class which should be equal to user.

04:31.890 --> 04:33.460
Run the following command.

04:33.500 --> 04:43.230
And there's any group member identity group and members is taken from the variable users.

04:43.230 --> 04:50.730
So the first line in this code will Querrey all users in the given organizational unit and store the

04:50.730 --> 04:53.160
details in the User variable.

04:53.160 --> 05:02.620
The same variable is passed to to the members parameter of the member command left in the second line

05:02.920 --> 05:09.970
this kind of additional Kemang letter is useful if you have an o use structure based on Departments

05:10.240 --> 05:20.110
buildings and offices and you want to add all the sales users for example to one security group or all

05:20.110 --> 05:24.970
users in the same building to another security group and so on.

05:24.970 --> 05:32.390
Similarly you can copy members from one security group to another by four in a sample command.

05:32.530 --> 05:34.460
The command looks like this.

05:34.480 --> 05:42.500
Again we read a members variable which is a road to get a group member identity test group.

05:42.500 --> 05:51.870
Another line is at a dead group member identity turns group dush copy and members is taken from members

05:51.880 --> 05:52.820
variable.

05:52.840 --> 06:00.640
The first line reads the membership details of the test group Security Group and store it in a variable

06:00.910 --> 06:05.070
then the same variable is passed to the HDD.

06:05.180 --> 06:05.970
Sorry.

06:06.080 --> 06:08.100
There's a group member.

06:08.140 --> 06:14.960
C'mon glad to add members to your security group which is called test group the Sgarbi.

06:15.010 --> 06:19.480
Here you should know that the target group should be created beforehand.

06:19.570 --> 06:24.790
If you haven't created the target group the operation will fail.

06:24.790 --> 06:33.100
Now let's check the results of these commands in active directory users and computers console to see

06:33.100 --> 06:41.390
it in graphical user interface so lets open active directory users and computers find their group.

06:41.470 --> 06:49.780
Group one which was used in the first example and sees a member of this group Lepp user one should be

06:49.780 --> 06:50.620
here.

06:50.650 --> 06:54.850
The second example was Ed and three users to this group.

06:54.850 --> 06:58.420
And as you can see all users are here as well.

06:58.420 --> 07:01.910
Their views are wrong lapu they are too and let users 3.

07:01.910 --> 07:09.200
He also added Lerp user 3 to test group and group one Desch read.

07:09.340 --> 07:14.590
So let's find a test group and check members of this group.

07:14.770 --> 07:18.720
As you can see all ep user 3 is here as well.

07:18.730 --> 07:27.120
They are also populated this group with the members from users text file and told all of them are here.
