Installing and Configuring Microsoft LAPS

1. Download Local Administrator Password Solution (LAPS).

2. Install LAPS on your management machine.

3. For LAPS to function we need to update AD schema with the two new attributes:

  • ms-Mcs-AdmPwd – this attribute stores the local administrator password.
  • ms-Mcs-AdmPwdExpirationTime – this attribute stores the password expiration time for the local administrator password.

Continue reading

How to migrate from FRS to DFSR

Migration process from File Replication Service (FRS) to Distributed File System (DFS Replication) is done through four migration states:

  1. Start (State 0) – initial default state of a domain controller.
  2. Prepared (State 1) – you can roll back to Start state.
  3. Redirected (State 2) – you can roll back to Prepared or Start state.
  4. Eliminated (State 3) – migration to the Eliminated state CANNOT be reverted!

Before proceeding with migration let’s look at prerequisites.

Continue reading

PowerShell cmdlets for AD DS

Domain and Forest

Get all Domain Controllers by Hostname, IPv4 and Operating System.

Get-ADDomainController -Filter * | Format-Table Hostname, IPv4Address, OperatingSystem -AutoSize

Gets the domain information for the domain “fabrikam.com”.

Get-ADDomain fabrikam.com

Display domain wide FSMO Roles (RID Master, PDC Emulator, Infrastructure Master).

Get-ADDomain | Format-List RIDMaster, PDCEmulator, InfrastructureMaster

Get the forest information of the “fabrikam.com” forest.

Get-ADForest fabrikam.com

Display forest wide FSMO Roles (Schema Master and Domain Naming Master).

Get-ADForest | Format-List SchemaMaster, DomainNamingMaster

Get the default domain password policy from a specified domain.

Get-ADDefaultDomainPasswordPolicy -Identity fabrikam.com

Continue reading

How to upgrade Domain Controller to Windows Server 2016

In this post I am going to describe how to upgrade Domain Controller from Windows Server 2012 R2 to Windows Server 2016 Domain Controller.
Recommended way of doing upgrade is to promote clean install of Windows Server 2016 to Domain Controller and demote old one.

Continue reading

How to use PowerShell DSC to deploy Active Directory on Windows Server 2012 R2

In today’s blog post we will install new Windows Server 2012 AD Forest that contains two Domain Controllers. We are going to use PowerShell DSC to help us make this deployment.

For this example, we have 3 VM’s:

  • Router – 192.168.1.1/24
  • DC01 (Server 2012 R2) – 192.168.1.2/24
  • DC02 (Server 2012 R2) – 192.168.1.3/24
  • RSAT (Server 2012 R2) – 192.168.1.4/24

Continue reading

How to create Group Policy Central Store

Group Policy Central Store provides one central location for ADMX/ADML files in your organization.

By creating GPO Central Store all Group Policy Management Consoles (GPMC) are going to pull templates required to create and edit GPOs from this central location and by doing this all Administrators are going to work with the same set of policies.
Providing ADMX/ADML files through Central Store is simply easier than making sure every GPO Administrator has all required ADMX/ADML files on all computers running GPMC.

Note: by implementing Central Store your old GPOs that you have created before implementing Central Store are still going to work without a problem (don’t use this as excuse for not doing backup before creating Central Store).

Continue reading

Windows Server 2012 R2 – AD DS installation and configuration – Part 1

In series of 4 posts, through examples I am going to show how to install and configure Forest Root Domain Controller and Additional/Backup Domain Controller on Windows Server 2012 R2 Core in Virtual Machine running on Hyper-V Server 2012.

Continue reading

Windows Server 2012 R2 – AD DS installation and configuration – Part 2

Prepare (VDC01) Windows Server 2012 R2 for AD DS

1. Change Computer Name to “VDC01” and restart computer with the following commands:

PS C:\>Rename-Computer -NewName VDC01
PS C:\>Restart-Computer

2. Enable Remote Desktop and select “Allow only clients running Remote Desktop with Network Level Authentication <more secure>” with the following commands:

PS C:\>set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server'-Name "fDenyTSConnections" -Value 0
PS C:\>Enable-NetFirewallRule -DisplayGroup "Remote Desktop"
PS C:\>set-ItemProperty -Path 'HKLM:\System\CurrentControlSet\Control\Terminal Server\WinStations\RDP-Tcp' -Name "UserAuthentication" -Value 1 

3. Configure static IP and DNS settings with following commands:

PS C:\>New-NetIPAddress –InterfaceIndex 12 –IPAddress 192.168.1.10 -PrefixLength 24 -DefaultGateway 192.168.1.1
PS C:\>Set-DnsClientServerAddress -InterfaceIndex 12 -ServerAddresses ("192.168.1.11","127.0.0.1")

Note: to check InterfaceIndex value run following command:

PS C:\> Get-NetAdapter -Name * | Format-Table –AutoSize

Continue reading

Windows Server 2012 R2 – AD DS installation and configuration – Part 3

AD DS installation and configuration on VDC01

1. To Install AD Domain Services run following command from Powershell:

PS C:\>Install-WindowsFeature -Name AD-Domain-Services

2. Promote server to a forest root domain controller with Powershell script:

#
# Windows PowerShell Script for AD DS Deployment
#

Import-Module ADDSDeployment
Install-ADDSForest `
-CreateDNSDelegation:$false `
-DatabasePath "E:\NTDS" `
-DomainMode "Win2012R2" `
-DomainName "domainname.hr" `
-DomainNetBIOSName "DOMAINNAME" `
-ForestMode "Win2012R2" `
-InstallDNS:$true `
-LogPath "E:\NTDS" `
-NoRebootOnCompletion:$false `
-SYSVOLPath "E:\SYSVOL"
-Force:$true

3. Check and make sure that preferred and alternate DNS servers have the right IP address entered (in this case 192.168.1.11 and 127.0.0.1):

IP Address: 192.168.1.10
Subnet Mask: 255.255.255.0
Default Gateway: 192.168.1.1
Preferred DNS Server: 192.168.1.11
Alternate DNS Server: 127.0.0.1

Continue reading