WEBVTT

00:00.450 --> 00:07.710
Now let's talk about enabling or disabling computer accounts as a system administrator is required to

00:07.710 --> 00:13.620
keep your Active Directory database clean tidy and minimal in size.

00:13.620 --> 00:23.470
Also one must add here to the security policies of the organization and often needs to reconcile computer

00:23.470 --> 00:28.000
records data monthly quarterly and annually.

00:28.020 --> 00:36.870
In accordance with low security policies I'm glad we use here is not specific to computer subjects.

00:36.930 --> 00:45.780
It can also be used for an Active Directory user computer or service accounts so we could use the following

00:45.810 --> 00:54.780
command to enable a particular computer get say the computer the are for the computer with identity

00:55.080 --> 01:03.410
computer one for example or some other computer and pipe it to enable this area called Come On left

01:03.630 --> 01:09.420
to enable multiple computer accounts you can to use filters in conjunction with.

01:09.420 --> 01:14.440
Get this 80 computer or such search day count Come on lads.

01:14.640 --> 01:22.350
The foreign command will search for computer accounts inside the given over you and it will enable all

01:22.350 --> 01:23.210
of them.

01:23.220 --> 01:24.400
Let's review that.

01:24.410 --> 01:31.740
That command got a computer and will be filtering on the following criteria.

01:31.740 --> 01:36.500
We'll be looking for all the computers in the US.

01:36.620 --> 01:46.680
Oh you so search base parameter is to look for the following computers in the folder and all your container.

01:46.710 --> 01:52.360
In my case it's computers it's SOP O you of production.

01:52.500 --> 01:55.950
Were you in contorts or dot com domain.

01:55.950 --> 02:05.730
And the results which we all get will buy to enable does 88 count come and left which will enable all

02:05.730 --> 02:12.840
these computers in the Folarin Oh you pass through parameter will show us the results.

02:12.840 --> 02:15.280
The output of this command.

02:15.280 --> 02:25.470
Similarly to disable computer accounts just replace enable Adey account with the disable A-Day account

02:25.810 --> 02:31.320
command let the foreign command disables all the computers inside the given.

02:31.350 --> 02:39.720
Oh you again will use an get the computer filter in all the computers in their computers.

02:39.720 --> 02:47.950
All you wishes is in production all your and pipe the results to disable the account command left.

02:48.000 --> 02:55.620
Of course remember about explore and more by referring to the help content of this.

02:55.620 --> 02:59.300
Come on you go of this or all of the following command.

02:59.310 --> 03:00.540
Get help.

03:00.630 --> 03:08.190
Get the computer details or examples or online whatever property you need right now.

03:08.280 --> 03:16.080
Some votes about deleting computer accounts as we've discussed in previous lessons as a system administrator

03:16.080 --> 03:24.750
one must adhere to the security policies of the organization and keep their Active Directory database

03:24.750 --> 03:28.380
clean and tidy as part of this process.

03:28.380 --> 03:36.470
You might want to delete Stael or fly them computers or objects from Active Directory.

03:36.600 --> 03:45.150
We could use the following simple command to delete a computer account removed as a computer identity

03:45.420 --> 03:54.080
computer one of the most commonly used cases searching for computers older than some quantity of days.

03:54.090 --> 04:03.080
For example older than 30 days or small a quantity and removing them from your Active Directory.

04:03.240 --> 04:11.040
You can achieve this using the following command will add a new variable with the name computers which

04:11.040 --> 04:20.460
will be equal to Gatun all computers which have the following properties last Lagon date and pipe it

04:20.460 --> 04:23.090
to the following request.

04:23.100 --> 04:29.950
So the last logon date should be later than 10 or 20 or 30 days.

04:30.030 --> 04:38.760
So that for an example search is Active Directory for computers that are not reached in the last 30

04:38.760 --> 04:47.660
days and store them in a variable later when we can pass the variable to the Remove the computer command

04:47.670 --> 04:50.340
lead to delete them by default.

04:50.340 --> 04:57.190
This command that will prompt you for each deletion you can override it to use in their current form

04:57.450 --> 04:59.380
parameter was false.

04:59.420 --> 05:07.040
Bra remove the computer come and let you do it multiple computer accounts that have allocation.

05:07.050 --> 05:14.570
Well you're set to for example office one you can use the following command get a computer filtered

05:14.580 --> 05:23.580
them by like kasian which is equal to office wan and pipe the results to remove 80 computer command

05:23.580 --> 05:28.710
letters confirm parameter which is equal to false.

05:28.860 --> 05:35.820
If you want to remove all computer accounts in particular over you you could hear the following code

05:36.050 --> 05:37.630
get a computer.

05:37.720 --> 05:41.450
Serge Beys will believe in him the following.

05:41.490 --> 05:45.270
Oh Ewan's in my case it's disabled computer.

05:45.360 --> 05:47.320
Oh you and possum.

05:47.370 --> 05:57.470
These are results to BYB this resolves to remove a computer command Lathyrus conform set to false proper

05:57.520 --> 06:00.660
to loose examples will help you to get started.

06:00.660 --> 06:09.210
For instance you can use a get a computer command lead to search computer accounts use different patterns

06:09.510 --> 06:15.240
and pass them to remove the computer command lead to delete them.
