Lab: Configuring security in Windows Server
Scenario
Contoso Pharmaceuticals is a medical research company with about 5,000 employees worldwide. They have specific needs for ensuring that medical records and data remain private. The company has a headquarters location and multiple worldwide sites. Contoso has recently deployed a Windows Server and Windows client infrastructure. You have been asked to implement improvements in the server security configuration.
Objectives
After completing this lab, you will be able to:
- Configure Windows Defender Credential Guard.
- Locate problematic user accounts.
- Implement and verify LAPS (Local Administrator Password Solution)
Estimated time: 40 minutes
Lab setup
Virtual machines: WS-011T00A-SEA-DC1, WS-011T00A-SEA-SVR1, and WS-011T00A-SEA-ADM1 User name: Contoso\Administrator Password: Pa55w.rd
Exercise 1: Configuring Windows Defender Credential Guard
Note: In the lab environment, Credential Guard will not run VMs because they don’t meet the requirements. You can still create the GPO (Group Policy Objects) and run the tool.
Task 1: Enable Windows Defender Credential Guard using Group Policy
- Sign-in to SEA-ADM1 as Contoso\Administrator with the password Pa55w.rd.
- Select Start, and then enter Group Policy Management.
- Select Group Policy Management.
- In the Group Policy Management Console, expand Forest:
Contoso.com
, expand Domains, expandContoso.com
, right-click or access the context menu for the IT OU (Organizational Unit), and then select Create a GPO in this domain, and Link it here. - In the New GPO dialog box, in the Name text box, enter CredentialGuard_GPO, and then select OK.
- In the Group Policy Management window, under IT, right-click or access the context menu for CredentialGuard_GPO, and then select Edit.
- In the Group Policy Management Editor, navigate to Computer Configuration\Policies\Administrative Templates\System\Device Guard.
- Select Turn On Virtualization Based Security, and then select the policy setting link.
- Select Enabled.
- In the Select Platform Security Level drop-down list, select Secure Boot and DMA Protection.
- In the Credential Guard Configuration drop-down list, select Enabled with UEFI lock.
- In the Secure Launch Configuration drop-down list, select Enabled, and then select OK.
- Close the Group Policy Management Editor.
- Close the Group Policy Management Console.
Task 2: Enable Windows Defender Credential Guard using the Hypervisor-Protected Code Integrity and Windows Defender Credential Guard hardware readiness tool
- On SEA-ADM1, select Start, and then enter Powershell.
- Right-click or access the context menu for Windows PowerShell, and then select Run as administrator.
-
Enter the following command:
cd c:\\labfiles\\Mod08 DG_Readiness_Tool.ps1 -Enable -AutoReboot
- Your virtual machine will restart after the tool has completed running.
- When the virtual machine restarts, reenter the credentials for Contoso\Administrator.
Exercise 2: Locating problematic accounts
Task 1: Locate and reconfigure accounts with passwords that don’t expire
- Sign in to SEA-ADM1 as Contoso\Administrator with the password Pa55w.rd.
- Open Windows PowerShell.
-
Enter the following command:
Get-ADUser -Filter {Enabled -eq $true -and PasswordNeverExpires -eq $true}
- Review the list of user accounts returned.
-
Enter the following command:
Get-ADUser -Filter {Enabled -eq $true -and PasswordNeverExpires -eq $true} | Set-ADUser -PasswordNeverExpires $false
- Rerun the command from step 3 and notice that no users are returned.
Task 2: Locate and disable accounts to which no sign-ins have occurred for at least 90 days
-
Enter the following commands:
$days = (Get-Date).Adddays(-90) Get-ADUser -Filter {LastLogonTimeStamp -lt $days -and enabled -eq $true} -Properties LastLogonTimeStamp
- In the lab environment, no accounts will be returned.
-
Enter the following command:
Get-ADUser -Filter {LastLogonTimeStamp -lt $days -and enabled -eq $true} -Properties LastLogonTimeStamp | Disable-ADAccount
- No results will be returned in the lab environment.
Exercise 3: Implementing LAPS
Task 1: Prepare OU and computer accounts for LAPS (Local Administrator Password Solution)
- Sign in to SEA-ADM1 as Contoso\Administrator with the password Pa55w.rd.
- Open Windows PowerShell.
-
Enter the following commands:
New-ADOrganizationalUnit -Name "Seattle_Servers" Get-ADComputer SEA-SVR1 | Move-ADObject –TargetPath "OU=Seattle_Servers,DC=Contoso,DC=com"
-
Enter the following command:
Msiexec /I C:\Labfiles\Mod08\LAPS.x64.msi
- When the Local Administrator Password Solution Setup Wizard opens, select Next.
- Select I accept the terms in the License Agreement, and then select Next.
- Under Custom Setup, in the drop-down menu next to Management Tools, select Entire feature will be installed on the local hard drive.
- Select Next, select Install, and then select Finish.
Task 2: Prepare AD DS (Active Directory) for LAPS
-
In Windows PowerShell, enter the following commands:
Import-Module admpwd.ps Update-AdmPwdADSchema Set-AdmPwdComputerSelfPermission -Identity "Seattle_Servers"
- Select Start, and then enter Group Policy.
- Select Group Policy Management.
- In the Group Policy Management Console, expand Forest:
Contoso.com
, expand Domains, expandContoso.com
, right-click or access the context menu for the Seattle_Servers OU, and then select Create a GPO in this domain, and Link it here. - In the New GPO dialog box, in the Name text box, enter LAPS_GPO, and then select OK.
- In the Group Policy Management window, under Seattle_Servers, right-click or access the context menu for LAPS_GPO, and then select Edit.
- In the Group Policy Management Editor window, under Computer Configuration, expand the Policies node, expand the Administrative Templates node, and then select LAPS.
- Select the Enable local admin password management policy, and then select the policy settings link.
- In the Enable local admin password management window, select Enabled, and then select OK.
- Select the Password Settings policy, and then select the policy settings link.
- In the Password Settings policy dialog box, select Enabled, and then configure Password Length to 20.
- Verify that the Password Age (Days) is configured to 30, and then select OK.
- Close the Group Policy Management Editor.
Task 3: Deploy LAPS client-side extension
- Switch to SEA-SVR1, using Contoso\Administrator with the password Pa55w.rd.
Note: You will be prompted to change your password, due to the previous exercise. Use the new password in place of the documented password throughout the remainder of the lab.
-
Enter the following command:
Msiexec /I \\SEA-ADM1\c$\Labfiles\Mod08\LAPS.x64.msi
- When the Local Administrator Password Solution Setup Wizard opens, select Next.
- Select I accept the terms in the License Agreement, and then select Next.
- Select Next again, and then select Install.
- Select Finish.
-
Enter the following command:
gpupdate /force
Task 4: Verify LAPS
- Switch to SEA-ADM1.
- Select Start, select LAPS, and then select LAPS UI.
- In the LAPS UI dialog box, in the ComputerName text box, enter SEA-SVR1, and then select Search.
- Review the Password and the Password expires values, and then select Exit.
-
In the Windows PowerShell window, enter the following command:
Get-ADComputer SEA-SVR1 -Properties ms-Mcs-AdmPwd
- Review the password assigned to SEA-SVR1.
- Close the gridview window.