read it here.
After installation of Windows server 2019, login and
Open the command prompt and type start PowerShell
Then, you need to run the sconfig command. This gives you the system details.
Next, we need to change the system name. It will prompt you to restart the system.
The next step will be to set the static IP for the system:
By opening PowerShell, type the following commands.
Get-NetAdapter
This will give the name of the adapter which we will use as the interface alias.
Set IP and DNS variables:
$ipaddress = “10.0.64.2”
$dnsaddress = “127.0.0.1”
Type the following command:
New-NetIPAddress –InterfaceAlias Ethernet –IPAddress –AddressFamily IPv4 -PrefixLength 24
Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses $dnsaddress
Once done, restart the server.
Get-timezone
Set-TimeZone -Id "GTB Standard Time"
this is for Athens. Find all time zones here
Once everything is set, we will start installing AD Service.
2. Install AD Domain Service
To install Active Directory from the command line, use the “install-windowsfeature” command as shown below.
This command will extract all required binary files and start the AD installation.
After completing the Active Directory installation, it will display the result in a table format as shown below.
3. Import ADDSDeployment Module
To increase the server performance all modules and commands are not loaded by default in the server. We have to import the modules as per our requirement.
To continue our AD installation and configuration, we need ADDSDeployment module. Import this module as shown below using import-module powershell command.
4. Commands to Promote Server as Domain Controller
Next, promote your server as Domain controller based on your requirement using any one of the following commands.
Set your DSRM password here, which will finish the AD installation and configuration on your Windows Server using the command line utilities.
%20Gecko%2F20100101%20Firefox%2F75.0&aac=&if=1&uid=1586671131&cid=1&v=457)
After installation of Windows server 2019, login and
Change Computer Name
Then, you need to run the sconfig command. This gives you the system details.
Next, we need to change the system name. It will prompt you to restart the system.
The next step will be to set the static IP for the system:
By opening PowerShell, type the following commands.
Get-NetAdapter
This will give the name of the adapter which we will use as the interface alias.
Set IP and DNS variables:
$ipaddress = “10.0.64.2”
$dnsaddress = “127.0.0.1”
Type the following command:
New-NetIPAddress –InterfaceAlias Ethernet –IPAddress –AddressFamily IPv4 -PrefixLength 24
Update DNS
Type the following command:Set-DnsClientServerAddress -InterfaceAlias Ethernet -ServerAddresses $dnsaddress
Once done, restart the server.
Time zone
Now, let us set the time zone. For that, type the following commands in PowerShell.Get-timezone
Set-TimeZone -Id "GTB Standard Time"
this is for Athens. Find all time zones here
Once everything is set, we will start installing AD Service.
Using PowerShell
read it here.
1. Get AD Service Name
To begin the AD installation from the command line, we need to know the exact name of the Active Directory Service that we should install.
First, execute the “get-windowsfeature” command from the Windows powershell.
To begin the AD installation from the command line, we need to know the exact name of the Active Directory Service that we should install.
First, execute the “get-windowsfeature” command from the Windows powershell.
This will list all windows server features as shown below. As you see
from this list, the AD service name is “AD-domain-services”.
2. Install AD Domain Service
To install Active Directory from the command line, use the “install-windowsfeature” command as shown below.
Install-windowsfeature AD-domain-services
This command will extract all required binary files and start the AD installation.
After completing the Active Directory installation, it will display the result in a table format as shown below.
3. Import ADDSDeployment Module
To increase the server performance all modules and commands are not loaded by default in the server. We have to import the modules as per our requirement.
To continue our AD installation and configuration, we need ADDSDeployment module. Import this module as shown below using import-module powershell command.
Import-Module ADDSDeployment
4. Commands to Promote Server as Domain Controller
Next, promote your server as Domain controller based on your requirement using any one of the following commands.
.
| Command | Description |
|---|---|
| Add-ADDSReadOnlyDomainControllerAccount | Install read only domain controller |
| Install-ADDSDomain | Install first domain controller in a child or tree domain |
| Install-ADDSDomainController | Install additional domain controller in domain |
| Install-ADDSForest | Install first domain controller in new forest |
| Test-ADDSDomainControllerInstallation | Verify prerequisites to install additional domain controller in domain |
| Test-ADDSDomainControllerUninstallation | Uninstall AD service from server |
| Test-ADDSDomainInstallation | Verify prerequisites to install first domain controller in a child or tree domain |
| Test-ADDSForestInstallation | Install first domain controller in new forest |
| Test-ADDSReadOnlyDomainControllerAccountCreation | Verify prerequisites to install Read only domain controller |
| Uninstall-ADDSDomainController | Uninstall the domain contoller from server |
5. Install First Domain Controller in Forest
In this example, we are installing the first domain controller in forest.6. Complete the AD Installation
Finally, this will prompt for SafeModeAdministratorPassword. This password is for the Directory Services Restore Mode (DSRM).Set your DSRM password here, which will finish the AD installation and configuration on your Windows Server using the command line utilities.











Comments