Windows Server identity security: LAPS, gMSA and Protected Users

These days attackers rarely come in through the firewall. They steal one password and hop from computer to computer until they reach a Domain Admin. Windows Server identity security is about making each of those hops hard, with unique local passwords, service accounts whose password nobody knows, and admin accounts that can’t be reused anywhere else.

You’ll deploy Windows LAPS and replace svc_intranet with a group Managed Service Account. Then you’ll create a separate admin account in Protected Users, give admins a stricter fine-grained password policy and see how admin tiering ties it all together.

TimeYou needBy the end you can
About 90 minutesDC01, SRV01 and CL01 from Lesson 21, including svc_intranetDeploy Windows LAPS, create and install a gMSA, use Protected Users and fine-grained password policies, and explain tiering, JEA and Credential Guard

What it is, in one line

Windows Server identity security means protecting the accounts and credentials in your domain so that one stolen password can’t be turned into control of everything.

In Simple Words

Keys in a big office

Imagine a company where the same key opens every office door and every manager carries a master key everywhere, even to the café. Lose one key and the whole building is open. A careful company gives each door its own key and keeps them in a locked cabinet (LAPS), has a boiler room key that changes itself every month and that no person ever holds (a gMSA), and never lets master keys leave the secure floor (Protected Users and tiering).

It takes more effort to set up, but now a lost key is a small problem and not a disaster.

Engineer's View

LAPS, gMSA, Protected Users, FGPP, tiering

Windows LAPS (built into Windows 11 and Server 2019 and later) gives a local admin account on each computer a random password, rotates it and stores it in AD (encrypted, with domain functional level 2016+) or in Entra ID. Only the groups you allow can read it.

gMSA: a group Managed Service Account has a 240-character password that the DCs generate from a KDS root key and rotate every 30 days. Only the computers you list can retrieve it, so services run without any person knowing a password. Windows Server 2025 also adds delegated MSAs (dMSA) for migrating old service accounts.

Protected Users is a group whose members can’t use NTLM, DES or RC4, can’t be delegated, don’t have their credentials cached and get 4-hour TGTs, so test first and then put your admin accounts in it. Fine-grained password policies (PSOs) let you give certain users or groups stricter rules than the domain policy.

Tiering: Tier 0 is AD itself (DCs, PKI and the admins of those), Tier 1 is servers and Tier 2 is workstations. Admins have a separate account for each tier and never sign in to a lower tier with a higher-tier account. JEA limits what admins can run remotely, and Credential Guard uses virtualization to isolate the secrets in LSASS.

How it works, step by step

This is how one weak spot grows into a domain takeover, and which control breaks each step:

Windows Server identity security: attack chain from phishing to Domain Admin and the control for each step

You won’t find one control that stops every attack. Put together, they break the chain at several points, so a compromised laptop stays a laptop problem.

This is the identity layout you’ll have once the lab is done:

Windows Server identity security controls in the lab: LAPS, gMSA, Protected Users admin and PSO
  1. LAPS: extend the schema, let Workstations computers write their passwords, set the policy, read CL01’s password.
  2. gMSA: create the KDS root key and gmsa_intranet, install it on SRV01, move the SPN, disable svc_intranet.
  3. Admin account: adm.rahul in Admin Accounts, in Domain Admins and Protected Users.
  4. PSO: 16-character minimum and stricter lockout for Domain Admins.

Hands-on Lab: Windows Server identity security controls

Before you run any command, double-check it

Read every command twice before you press Enter. Check the target: the system or account, the IDs, the names and the sizes. These commands are for learning and were tested in our lab, not on your system. At work, run the read-only list commands first, follow your change process, make sure a backup exists, and ask a second person to check anything that changes or deletes data. You run them at your own risk.

Start DC01, SRV01 and CL01. Unless a step tells you otherwise, work on DC01 as SAATLAB\Administrator in PowerShell as administrator.

1Prepare AD for Windows LAPS

On DC01, run this:

Update-LapsADSchema -Confirm:$false
Set-LapsADComputerSelfPermission -Identity 'OU=Workstations,OU=SAATLAB,DC=saatlab,DC=internal'

You should see something like this:

Name         DistinguishedName
----         -----------------
Workstations OU=Workstations,OU=SAATLAB,DC=saatlab,DC=internal

The schema update adds the msLAPS attributes to computer objects. The permission lets each computer in Workstations (and the OUs under it) write its own password, and nothing more.

✅ Checkpoint: Update-LapsADSchema finished without errors and the permission is set on Workstations.

2Turn on LAPS with Group Policy

Create a GPO called C-LAPS, link it to Workstations and edit it. Go to Computer Configuration, Policies, Administrative Templates, System, LAPS.

Enable Configure password backup directory and choose Active Directory. Enable Password Settings (keep the defaults: large letters, small letters, numbers, specials; 14 characters; 30 days). Enable Enable password encryption.

On CL01 (as labadmin or another admin), apply it now rather than waiting:

gpupdate /force
Invoke-LapsPolicyProcessing

Then read the password back on DC01:

Get-LapsADPassword -Identity CL01 -AsPlainText

You should see something like this:

ComputerName        : CL01
DistinguishedName   : CN=CL01,OU=Workstations,OU=SAATLAB,DC=saatlab,DC=internal
Account             : Administrator
Password            : 7k#Qe2v!Lm9xRt
PasswordUpdateTime  : 19/10/2026 18:55:31
ExpirationTimestamp : 18/11/2026 18:55:31
Source              : EncryptedPassword
DecryptionStatus    : Success
AuthorizedDecryptor : SAATLAB\Domain Admins

CL01’s built-in Administrator now has its own random password, which changes every 30 days and is stored encrypted, and by default only Domain Admins can decrypt it. Once someone has used it, run Reset-LapsPassword on the computer so the password is never used twice.

✅ Checkpoint: Get-LapsADPassword shows a password for CL01 with Source EncryptedPassword.

Windows Server identity security lab: Get-LapsADPassword shows CL01 local admin password
CL01’s local Administrator password, unique and encrypted in AD, readable only by Domain Admins.

3Create a gMSA for the intranet site

On DC01, run this:

Add-KdsRootKey -EffectiveTime ((Get-Date).AddHours(-10))
New-ADServiceAccount -Name gmsa_intranet -DNSHostName gmsa_intranet.saatlab.internal -PrincipalsAllowedToRetrieveManagedPassword 'SRV01$'
setspn -D HTTP/intranet.saatlab.internal SAATLAB\svc_intranet
setspn -S HTTP/intranet.saatlab.internal SAATLAB\gmsa_intranet$
Disable-ADAccount svc_intranet

You should see something like this (after the KDS key GUID):

Unregistering ServicePrincipalNames for CN=svc_intranet,OU=Service Accounts,OU=SAATLAB,DC=saatlab,DC=internal
        HTTP/intranet.saatlab.internal
Updated object
Checking domain DC=saatlab,DC=internal

Registering ServicePrincipalNames for CN=gmsa_intranet,CN=Managed Service Accounts,DC=saatlab,DC=internal
        HTTP/intranet.saatlab.internal
Updated object

Normally DCs wait 10 hours before using a new KDS root key, so that it has replicated to every DC. Backdating it with -EffectiveTime is fine in a one-site lab and never acceptable in production. gMSAs live in the Managed Service Accounts container, and like computer accounts their names end in $.

On SRV01, install it and test it:

Install-ADServiceAccount gmsa_intranet
Test-ADServiceAccount gmsa_intranet

You should see this:

True

✅ Checkpoint: Test-ADServiceAccount returns True on SRV01, and the SPN now belongs to gmsa_intranet$.

4Create a separate admin account in Protected Users

On DC01, run this:

New-ADUser -Name 'adm.rahul' -GivenName Rahul -Surname Verma -SamAccountName adm.rahul -UserPrincipalName adm.rahul@saatlab.internal -Path 'OU=Admin Accounts,OU=SAATLAB,DC=saatlab,DC=internal' -AccountPassword (Read-Host -AsSecureString 'Password (16+ characters)') -Enabled $true
Add-ADGroupMember 'Domain Admins' -Members adm.rahul
Add-ADGroupMember 'Protected Users' -Members adm.rahul
Get-ADPrincipalGroupMembership adm.rahul | Select-Object -ExpandProperty Name

You should see something like this:

Domain Users
Domain Admins
Protected Users

Rahul keeps rahul.verma for email and everyday work and uses adm.rahul only for admin tasks on servers and DCs. Sign out of DC01, sign in as SAATLAB\adm.rahul and run klist tgt. You’ll see the EndTime is 4 hours after StartTime instead of 10, because Protected Users get short TGTs.

✅ Checkpoint: adm.rahul is in Domain Admins and Protected Users, and its TGT lasts 4 hours.

5Give admins a stricter password policy

On DC01, create a fine-grained password policy for Domain Admins:

New-ADFineGrainedPasswordPolicy -Name 'PSO-Admins' -Precedence 10 -MinPasswordLength 16 -ComplexityEnabled $true -PasswordHistoryCount 24 -MaxPasswordAge 365.00:00:00 -MinPasswordAge 1.00:00:00 -LockoutThreshold 5 -LockoutDuration 00:30:00 -LockoutObservationWindow 00:30:00 -ReversibleEncryptionEnabled $false
Add-ADFineGrainedPasswordPolicySubject 'PSO-Admins' -Subjects 'Domain Admins'
Get-ADUserResultantPasswordPolicy adm.rahul | Select-Object Name, MinPasswordLength, LockoutThreshold

You should see something like this:

Name       MinPasswordLength LockoutThreshold
----       ----------------- ----------------
PSO-Admins                16                5

Rahul’s normal account still follows the domain policy (12 characters), while his admin account follows PSO-Admins. When several PSOs apply, the one with the lowest precedence number wins, and for a user with no PSO, Get-ADUserResultantPasswordPolicy shows nothing.

✅ Checkpoint: adm.rahul’s resultant policy is PSO-Admins with a 16-character minimum.

Take snapshots of DC01, SRV01 and CL01 called “Identity security”.

'DC01','SRV01','CL01' | ForEach-Object { VBoxManage snapshot $_ take "Identity security" }

Break It, Then Fix It

Security controls usually fail in one of two ways: they don’t apply where you think they do, or they block something you’d forgotten about. You’ll see one of each here.

1Break it: LAPS on an OU without the permission

On DC01, link C-LAPS to the Servers OU too:

New-GPLink -Name 'C-LAPS' -Target 'OU=Servers,OU=SAATLAB,DC=saatlab,DC=internal' | Out-Null

On SRV01 (as administrator), apply it and check:

gpupdate /force
Invoke-LapsPolicyProcessing
Get-WinEvent -LogName 'Microsoft-Windows-LAPS/Operational' -MaxEvents 5 | Select-Object TimeCreated, LevelDisplayName, Message | Format-List

You’ll see something like this:

TimeCreated      : 19/10/2026 19:04:12
LevelDisplayName : Error
Message          : Windows LAPS failed to update the password in Active Directory.
                   Error code: 0x80070005 (Access is denied.)
                   ...

And on DC01:

Get-LapsADPassword -Identity SRV01

Since no password was stored, you get nothing back, or something like this:

ComputerName      : SRV01
DistinguishedName : CN=SRV01,OU=Servers,OU=SAATLAB,DC=saatlab,DC=internal
Account           :
Password          :
...

The policy did reach SRV01, but SRV01 isn’t allowed to write its own LAPS attributes, because you granted that only on Workstations. What’s worse, a team could easily believe the servers are protected because “the GPO is linked”.

To fix it, grant the self permission on Servers and process the policy again on SRV01:

Set-LapsADComputerSelfPermission -Identity 'OU=Servers,OU=SAATLAB,DC=saatlab,DC=internal'   # on DC01
Invoke-LapsPolicyProcessing                                                               # on SRV01
Get-LapsADPassword -Identity SRV01 | Select-Object ComputerName, Source, PasswordUpdateTime  # on DC01

✅ Checkpoint: SRV01 failed with Access is denied, then stored its LAPS password after the permission was granted.

2Break it: Protected Users and NTLM

Sign in to SRV01 as adm.rahul and open the Departments share by name, then by IP address:

Get-ChildItem \\SRV01.saatlab.internal\Departments | Select-Object -First 1 Name
Get-ChildItem \\10.0.0.20\Departments

You’ll see something like this:

Name
----
Finance
Get-ChildItem : Access is denied
At line:1 char:1
+ Get-ChildItem \\10.0.0.20\Departments
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : PermissionDenied: (\\10.0.0.20\Departments:String) [Get-ChildItem], UnauthorizedAccessException

A Domain Admin denied access to a share?

By name, Windows uses Kerberos and it works. By IP, Windows needs NTLM, and members of Protected Users can’t use NTLM at all. For admin accounts that’s what you want, but it catches out people, and old scripts that use IP addresses.

To fix it, use names and track down the scripts that don’t:

Get-ChildItem \\SRV01.saatlab.internal\Departments | Select-Object -ExpandProperty Name

Don’t “fix” it by taking the admin out of Protected Users; find the IP-based paths and change them to DNS names. And before you add lots of admins to Protected Users, test each admin task with one account, as you’ve done here.

✅ Checkpoint: adm.rahul reaches the share by name and is denied by IP, because NTLM is blocked for Protected Users.

Windows Server identity security lab: Protected Users admin denied by IP because NTLM is blocked
By name, Kerberos works; by IP, NTLM is needed and Protected Users can’t use it.

This happened at work

One password for 900 laptops

A logistics company built every laptop from one image, and that image set the local Administrator password to the same value everywhere. It made support easy, and everyone in IT knew the password. Then an attacker phished a warehouse supervisor and got onto her laptop. From there they dumped the local Administrator password hash and used it to sign in to every other laptop over the network, without cracking anything. On one of those laptops, a Domain Admin had signed in the week before to fix a printer, and his credentials were still sitting in memory.

Within two days ransomware had run on every laptop and most of the servers, and recovery took three weeks. The fix: LAPS on all computers, separate admin accounts in Protected Users, a rule that Domain Admins never sign in to workstations, and helpdesk accounts that are local admin on workstations only.

The lesson: with a shared local password, one infected laptop becomes every laptop. A unique password per computer is one of the cheapest controls you can put in.

Common mistakes and troubleshooting

Mistake or symptomWhat happensWhat to do instead
Same local admin password everywhereOne stolen hash opens every computerWindows LAPS on every member
LAPS GPO linked, no self permission on the OULAPS log shows Access is denied, no password storedSet-LapsADComputerSelfPermission on each OU
Service accounts with old, known passwordsKerberoasting and reusegMSAs, or long random passwords
Backdating the KDS root key in productiongMSA failures on DCs that don’t have the key yetLet the 10 hours pass in production
Domain Admins used for daily workEmail and web browsing with the keys to everythingSeparate adm. accounts used only for admin
Adding admins to Protected Users without testingNTLM-only tools and IP paths stop workingTest each admin task first
Domain Admins signing in to workstationsCredentials left in memory on Tier 2 machinesTiering: no higher-tier sign-ins on lower tiers
One password policy for everyoneAdmins get the same rules as everyone elseFine-grained password policies for privileged groups
Nobody reads the LAPS event logSilent failuresMonitor Microsoft-Windows-LAPS/Operational

Interview questions

Click a question to open it. Each one is phrased the way an interviewer would ask it, and underneath you’ll find why they ask it and one way you could answer in your own words.

Fresher level

1. Say every PC in a company has the same local admin password. What is LAPS, and how would it help?

Why they ask this: They want to check that you know this basic security control and the risk it removes.

How you might answer: LAPS, the Local Administrator Password Solution, gives each computer’s local admin account its own random password and keeps rotating it. The password is stored in AD or Entra ID and only authorised admins can read it, so if one PC gets hacked, that password doesn’t open every other PC.

2. Can you explain in simple words what a gMSA is?

Why they ask this: They want to know you understand managed service accounts and why they beat normal service accounts.

How you might answer: A gMSA is a group Managed Service Account, a service account whose long password the domain controllers manage and rotate for you. Nobody has to know the password, and only the computers you allow can use the account.

3. A new admin asks why they have to use a separate account for admin work. What would you tell them?

Why they ask this: They want to see that you understand least privilege and can explain it without sounding like a rule book.

How you might answer: I’d tell them it keeps everyday things like email and browsing away from admin rights, so if they click a phishing link while signed in with their normal account, the damage stays small.

2–5 years experience

4. What happens to an account when you add it to the Protected Users group?

Why they ask this: They want to check that you know its effects, so you don’t break something by adding the wrong account.

How you might answer: Members can’t use NTLM, DES or RC4 and can’t be delegated, their credentials aren’t cached on devices and their TGTs last only 4 hours. Because of that, I’d test before adding service accounts or anyone who needs offline sign-in.

5. Security wants admins to have longer passwords than everyone else. How would you do that in AD?

Why they ask this: They want to see that you know fine-grained password policies and how precedence works.

How you might answer: I’d create a Password Settings Object with the stronger rules and apply it to the admins’ global group, and it overrides the domain password policy for those users. Every PSO has a precedence, and when more than one applies, the lowest number wins.

6. Walk me through how you would set up a gMSA for a service running on a server.

Why they ask this: They want to know if you have actually deployed one and know each step, including the small details.

How you might answer: If the domain has no KDS root key, I’d create one first. Then I’d create the account with New-ADServiceAccount, setting PrincipalsAllowedToRetrieveManagedPassword to the server or a group of servers. On the server I’d run Install-ADServiceAccount and set the service to use the account name ending in $, and finally I’d move any SPNs over to the new account.

Senior level

7. How would you explain the AD tiering model to a team that has never used it?

Why they ask this: They want to see that you think about where admin credentials get exposed, not just about permissions.

How you might answer: I’d explain that Tier 0 controls identity, so DCs, PKI and their admins, Tier 1 is servers and Tier 2 is workstations, with separate admin accounts for each tier. A higher-tier account never signs in to a lower tier, Tier 0 admins work from privileged access workstations, and we enforce it with sign-in restrictions.

8. Say you join a company with 40 Domain Admins. How would you bring that number down?

Why they ask this: They want to see that you apply least privilege in a practical way that doesn’t stop people working.

How you might answer: I’d start by listing what each person really does with those rights, then delegate those tasks on OUs or with JEA. For whatever’s left I’d use just-in-time membership or a PIM-style process, so in the end only a tiny group of break-glass accounts remains, and we watch those closely.

9. Your manager says, “We turned on Credential Guard, so stolen passwords aren’t a problem anymore.” How would you respond?

Why they ask this: They want to know that you understand what Credential Guard really protects and where it stops.

How you might answer: I’d say it helps a lot but it isn’t the whole answer. It isolates NTLM hashes and Kerberos TGTs in a virtualization-based container, which stops pass-the-hash from memory dumps, but it does nothing against keyloggers, phishing or an attacker working directly in the user’s session.

Quick quiz

Q1. What does Windows LAPS store in AD?

  1. The domain admin password
  2. A unique local admin password per computer
  3. User passwords
Show answer

B — Each computer’s own local admin password.

Q2. Who knows a gMSA’s password?

  1. The service owner
  2. Nobody; the DCs manage it
  3. The helpdesk
Show answer

B — Only allowed computers can retrieve it.

Q3. Why was SRV01’s LAPS update denied?

  1. Wrong GPO
  2. No self permission on the Servers OU
  3. Old schema
Show answer

B — Set-LapsADComputerSelfPermission per OU.

Q4. Why did adm.rahul get Access is denied by IP?

  1. Wrong share permissions
  2. Protected Users can’t use NTLM
  3. The share was offline
Show answer

B — IP access needs NTLM.

Q5. In the work story, what let the attacker move between laptops?

  1. A missing patch
  2. The same local admin password everywhere
  3. A weak Wi-Fi key
Show answer

B — LAPS would have stopped it.

Quick recap

  • Windows Server identity security breaks the chain from one stolen password to domain takeover.
  • Windows LAPS: schema update, self permission per OU, GPO, Get-LapsADPassword.
  • gMSAs replace service account passwords; install with Install-ADServiceAccount and move SPNs.
  • Separate admin accounts in Protected Users: no NTLM, 4-hour TGTs.
  • Fine-grained password policies give admins stricter rules.
  • Tiering keeps Tier 0 credentials off servers and workstations.

Next lesson

Lesson 23: Server hardening → You’ll apply a security baseline, check Defender and the firewall, require SMB signing, turn off old TLS versions, enable BitLocker and set up audit policy, then break something with a too-strict setting.

Further reading: Windows Server identity security

Want to go deeper into Windows Server identity security? Microsoft’s Windows LAPS overview and gMSA overview cover both features in detail. You can also see the full plan for this course on the Windows Server Administration course page.

Scroll to Top

This website uses cookies

We use a few cookies to keep this site working. If you allow it, we also use Google Analytics to count visits so we can improve our lessons. You can accept all, deny the optional ones, or choose what to allow.