In this article, I am going to show you Manage and Configure Active Directory with PowerShell on Server 2016? I know and you know the Method how to install it on Server with GUI, but what about the core Version of a Server? The primary reason behind this article is,
- PowerShell takes less time.
- Many Organizations are using the core Version instead of GUI.
- PowerShell knowledge is getting bigger and bigger, so it’s better for you to start learning by now.
In this article we will discuss:
- Get to Know Help System.
- Install Active Directory Domain Services.
- Import the required Modules.
- Configure Active Directory Domain Services.
- Installing the First Domain Controller in the Forest.
Note: Never Memorize commands, try to learn them, here is a trick How?
When I get into PowerShell, I was so afraid and I was asking myself How am I going to Put these many commands in my mind? But then I watch Jason Helmick ‘s course on up and running with PowerShell in Lynda.com, He should me that, the key to remember all the commands of PowerShell is The Help system of PowerShell infect Jeffrey Snover founder of PowerShell also recommend this method. Here are the two basic Course of PowerShell You have to watch.
- Getting started with PowerShell with Jeffery Snover and Jason Helmick at MVA.com
- Up and Running with PowerShell with Jason Helmick at Lynda.com
Get to Know Help System
If you are on core Version of the Server First type PowerShell and Press Enter. And if you are not on Core Server then simply open PowerShell.
Since ADDS is a feature in Windows Server, let’s collect Help on How to install it on the server?
Type Get-Help Install-Windowsfeature
Take a look at the syntax, first you have to type Install-Windowsfeature then you have to type –Name, it means type the name of the feature which you want to install, then you have to type –restart, it means if it requires restarting the system then restart it. In order to learn complete Help System Visit Discovering Microsoft PowerShell commands article.
Note: You have noticed that –name in the syntax but the question is what is the feature name?
I know I want to install Active Directory Domain Services but I don’t know the module name, in order to know that type this Get-windowsfeature command and Press Enter. Then go ahead and find the Active Directory Domain Services Module Name.
Install Active Directory Domain Services
Now that you have learned about the help system of PowerShell and How to get the name of the feature let’s get into installing it.
Type Install-windowsfeature –Name AD-Domain-Services -Restart -IncludeManagementTools command and Press Enter.
If everything goes well you should end up with this screen.
If it happened to come across an error, please let me know in the comment below and I will try my best to resolve the error.
Import the required Modules
Now that the installation has been completed this article is not going to end up here. Now I am going to install some additional to make the server run smoother and also walk through the process of setting up a new forest to make active directory work.
The module which I am going to import is the ADDSDeployment Module. You can import that with Import-Module ADDSDeployment command.
I will not provide a screenshot because there is no visible feedback from this command. If the command completed successfully then you will be faced with a blank prompt. Again, if you receive any errors, let me know.
Configure ADDS
Now, you need to promote your server to a domain controller. There are several commands that you can use to do this. Here is a list of the commands by which you can figure out which one best for you.
|
Installing the First Domain Controller in Forest
Since it is about configuring the ADDS, I need to create a new Forest. In order to do that Install-ADDSForest command.
When you do that PowerShell will ask you to insert the Domain Name. In that case, I have given Techroze.com.
After that PowerShell will ask to insert the Safe Mode Administration Password and then it will ask you to confirm the Password. After that PowerShell will ask you, the target Server will be configured as a Domain Controller and restarted when this operation is complete. DO you want to continue with the Operation?
Press Y on the keyboard and it will install the new forest.
Note: The Active Directory will now setup. You may receive various warnings, dependent on whether you have static IPs or not. You can see the progress of the installation in the teal-colored status bar covering the top half of the screen in the screenshot below.
When the installation Completes it will restart your system.
Summary
- Type Get-Windowsfeature command to show the Names of the feature.
- Then Type Install-windowsfeature –Name AD-Domain-Services -Restart -IncludeManagementTools
- Then type Import-Module ADDSDeployment command.
- Then type Install-ADDSForest command.
- Then Follow the instruction according to PowerShell like Domain Name, Safe Mode Password, and others.
That’s all, I hope this article helped you Manage and Configure Active Directory with PowerShell on Server 2016.If you liked this article, then please subscribe to our YouTube Channel for WordPress video tutorials. You can also find us on Twitter and Facebook.