Now let's talk about enabling or disabling computer accounts as a system administrator is required to
keep your Active Directory database clean tidy and minimal in size.
Also one must add here to the security policies of the organization and often needs to reconcile computer
records data monthly quarterly and annually.
In accordance with low security policies I'm glad we use here is not specific to computer subjects.
It can also be used for an Active Directory user computer or service accounts so we could use the following
command to enable a particular computer get say the computer the are for the computer with identity
computer one for example or some other computer and pipe it to enable this area called Come On left
to enable multiple computer accounts you can to use filters in conjunction with.
Get this 80 computer or such search day count Come on lads.
The foreign command will search for computer accounts inside the given over you and it will enable all
of them.
Let's review that.
That command got a computer and will be filtering on the following criteria.
We'll be looking for all the computers in the US.
Oh you so search base parameter is to look for the following computers in the folder and all your container.
In my case it's computers it's SOP O you of production.
Were you in contorts or dot com domain.
And the results which we all get will buy to enable does 88 count come and left which will enable all
these computers in the Folarin Oh you pass through parameter will show us the results.
The output of this command.
Similarly to disable computer accounts just replace enable Adey account with the disable A-Day account
command let the foreign command disables all the computers inside the given.
Oh you again will use an get the computer filter in all the computers in their computers.
All you wishes is in production all your and pipe the results to disable the account command left.
Of course remember about explore and more by referring to the help content of this.
Come on you go of this or all of the following command.
Get help.
Get the computer details or examples or online whatever property you need right now.
Some votes about deleting computer accounts as we've discussed in previous lessons as a system administrator
one must adhere to the security policies of the organization and keep their Active Directory database
clean and tidy as part of this process.
You might want to delete Stael or fly them computers or objects from Active Directory.
We could use the following simple command to delete a computer account removed as a computer identity
computer one of the most commonly used cases searching for computers older than some quantity of days.
For example older than 30 days or small a quantity and removing them from your Active Directory.
You can achieve this using the following command will add a new variable with the name computers which
will be equal to Gatun all computers which have the following properties last Lagon date and pipe it
to the following request.
So the last logon date should be later than 10 or 20 or 30 days.
So that for an example search is Active Directory for computers that are not reached in the last 30
days and store them in a variable later when we can pass the variable to the Remove the computer command
lead to delete them by default.
This command that will prompt you for each deletion you can override it to use in their current form
parameter was false.
Bra remove the computer come and let you do it multiple computer accounts that have allocation.
Well you're set to for example office one you can use the following command get a computer filtered
them by like kasian which is equal to office wan and pipe the results to remove 80 computer command
letters confirm parameter which is equal to false.
If you want to remove all computer accounts in particular over you you could hear the following code
get a computer.
Serge Beys will believe in him the following.
Oh Ewan's in my case it's disabled computer.
Oh you and possum.
These are results to BYB this resolves to remove a computer command Lathyrus conform set to false proper
to loose examples will help you to get started.
For instance you can use a get a computer command lead to search computer accounts use different patterns
and pass them to remove the computer command lead to delete them.