Module 2: Managing Users, Groups & Computer Accounts

🎯 AD Administration Course · Module 2 of 8

Managing Users, Groups & Computer Accounts

AZ-800
AZ-800 Exam Alignment
AZ-800

Manage AD DS objects: Create and manage user accounts, group types and scopes, and computer accounts. Understand the AGDLP nesting strategy and automate bulk operations with PowerShell.

  • Know all three group scopes (Domain Local, Global, Universal) and when each is used
  • Understand the AGDLP nesting model — Accounts into Global groups, Global into Domain Local, Domain Local assigned Permissions
  • Know which group scope can contain members from any domain in the forest (Universal)
  • Understand the difference between Security and Distribution groups and when to use each
Exam Tip: AZ-800 tests group scope nesting rules precisely. Remember: Universal Groups can contain users and groups from any domain in the forest and are expanded at logon (requiring GC contact). Excessive Universal Groups contribute to GC load and logon latency.
User, group, and computer accounts are the core objects in every Active Directory environment. Administrators create and manage these objects daily — and efficient management requires understanding both the GUI tools (ADUC) and PowerShell automation. Getting group types, scopes, and nesting right from the start prevents permission management complexity as the environment grows.

👤 User Accounts

Every person who needs access to domain resources requires a user account. User accounts in AD DS have required and optional attributes that affect authentication, mail routing, and management.

ADUC › techcareers.local › Users › New › User
AD
Active Directory Users and Computers
|
Users Container
🌎 techcareers.local
📁 Builtin
💻 Computers
🏗️ Domain Controllers
👤 Users
📁 HR
📁 IT

Users container
Name Type UPN
John Smith User jsmith@techcareers.local
IT-Admins Security Group (Global) —
Domain Admins Security Group (Global) —
ⓘ Best practice: move users and groups to dedicated OUs, not the default Users container. GPOs cannot be linked to the default Users container.

User Account Property Description Common Settings
User Logon Name (UPN) Format: username@domain.com — used for modern authentication and M365 logon Should match email address where possible. UPN suffix must be a verified domain.
Pre-Windows 2000 Logon NetBIOS format: DOMAIN\username — legacy authentication Max 20 characters. Generated automatically but can be customised.
Account Expiry Date after which account is automatically disabled Use for contractors and temporary staff. Set via Account tab.
Logon Hours Days and hours the user is permitted to log on Useful for shift workers or security-controlled environments.
Profile Path Network path to the user’s roaming profile \\server\profiles\%username% — stores desktop, documents, settings.
Home Folder Mapped drive pointing to the user’s personal network share Set to drive letter (H:) and UNC path: \\server\users\%username%

👥 Group Types and Scopes — AGDLP

Understanding group types and scopes is one of the most tested AD topics in interviews and on AZ-800. Use the AGDLP nesting model for scalable permission management.

Group Scope Members Can Be From Can Be Assigned Permissions On Best Used For
Domain Local (DL) Any domain in the forest, any trusted domain, universal groups Resources in the same domain only Assigning permissions to resources (file shares, printers). Example: TC-FileShare-Read
Global (G) Accounts and groups from the same domain only Any domain in the forest or trusted domain Grouping users by role/department. Example: TC-HR-Users, TC-IT-Admins
Universal (U) Accounts and groups from any domain in the forest Any domain in the forest Cross-domain resource access. Use sparingly — membership is stored in the GC and expanded at logon.

💡 AGDLP — The Recommended Nesting Model

  • Accounts → placed into Global groups (organised by role)
  • Global groups → placed into Domain Local groups (resource access groups)
  • Domain Local groups → assigned Permissions on resources
  • Example: User jsmith → TC-HR-Users (Global) → TC-FileShare-HR-Read (DL) → Permission on \\server\HR share
  • This model makes permission management scalable — adding a new user to HR only requires adding them to TC-HR-Users

💻 Computer Accounts and Domain Join

Computer accounts authenticate workstations and servers to the domain, enable Group Policy application, and are required for Kerberos authentication. A computer account is created automatically when a machine joins the domain.

Method Command / Steps Notes
GUI (Windows Settings) Settings → System → About → Join a domain Requires domain admin credentials or pre-created computer account with delegation
PowerShell Add-Computer -DomainName techcareers.local -Credential (Get-Credential) -Restart Best for scripted/bulk domain joins. Works on Server Core.
Pre-create account ADUC → Computers → New → Computer Pre-create and set who can join. Allows non-admin users to join specific machines.
Offline join djoin.exe /provision and /requestodj Used for machines without network access to a DC at join time (staging scenarios).
PowerShell — User, Group & Computer Account Management

# Create a new user account
New-ADUser -Name 'John Smith' -SamAccountName 'jsmith' -UserPrincipalName 'jsmith@techcareers.local' -Path 'OU=HR,DC=techcareers,DC=local' -AccountPassword (ConvertTo-SecureString 'P@ssw0rd!' -AsPlainText -Force) -Enabled $true

# Modify user properties
Set-ADUser -Identity jsmith -Title 'HR Manager' -Department 'Human Resources'

# Create a Global Security group (for user role grouping)
New-ADGroup -Name 'TC-HR-Users' -GroupScope Global -GroupCategory Security -Path 'OU=Groups,DC=techcareers,DC=local'

# Create a Domain Local group (for resource permission assignment)
New-ADGroup -Name 'TC-FileShare-HR-Read' -GroupScope DomainLocal -GroupCategory Security -Path 'OU=Groups,DC=techcareers,DC=local'

# Add user to Global group, then nest Global into DomainLocal (AGDLP)
Add-ADGroupMember -Identity 'TC-HR-Users' -Members jsmith
Add-ADGroupMember -Identity 'TC-FileShare-HR-Read' -Members 'TC-HR-Users'

# Bulk create users from CSV file
Import-Csv C:\users.csv | ForEach-Object {
    New-ADUser -Name $_.Name -SamAccountName $_.Username -Enabled $true -AccountPassword (ConvertTo-SecureString $_.Password -AsPlainText -Force)
}

# Join a computer to the domain
Add-Computer -DomainName 'techcareers.local' -Credential (Get-Credential) -Restart

💡 Best Practices

  • Move all users and groups out of the default Users container into dedicated OUs — GPOs cannot be linked to the built-in Users container
  • Follow the AGDLP model consistently — never assign permissions directly to user accounts; always use groups
  • Use Global groups for role-based grouping (TC-IT-Admins, TC-HR-Users) and Domain Local groups for resource access (TC-FileShare-Finance-Read)
  • Minimise Universal Group usage — their membership is stored in the global catalog and expanded at every logon, increasing GC load
  • Set account expiry dates for all contractor and temporary accounts at creation time — never rely on manual disabling
  • Implement a naming convention for all accounts and groups before deployment (e.g., TC-[Department]-[Role] for groups)

🎓 Interview Q&A

Q: What is the difference between a Security group and a Distribution group?
A Security group can be used to assign permissions to resources (file shares, printers, applications) AND as an email distribution list. A Distribution group can ONLY be used as an email list — it cannot be assigned permissions to AD resources. In most enterprise environments, Security groups are preferred because they serve both purposes. Distribution groups are typically created and managed by Exchange or Microsoft 365 for mail distribution only.

Q: Why should you avoid adding users directly to Domain Local groups instead of following AGDLP?
Bypassing AGDLP and adding users directly to Domain Local resource groups creates a management nightmare at scale. When a user changes roles, an admin must manually remove them from every individual resource group. With AGDLP, you simply remove the user from the role-based Global group, and they lose access to all associated resources instantly. AGDLP also makes auditing cleaner — you can see all resources a user has access to by looking at their Global group memberships, which are logically organised by role.

Q: What happens to a computer account password and why does it matter?
Computer accounts have passwords — like user accounts — that are automatically negotiated and changed by the computer every 30 days by default. This is handled by the Net Logon service (Secure Channel). If a machine’s account password falls out of sync with the DC (for example, if a VM is restored from a snapshot older than 30 days), the machine will fail to authenticate to the domain — a condition known as a broken secure channel. This is fixed by running Test-ComputerSecureChannel -Repair -Credential (Get-Credential) in PowerShell, or by resetting and rejoining the machine to the domain.

🎯 AZ-800 Mock Test
Module 2 — Users, Groups & Computers
5 questions · Scenario-based · Pass mark: 70%

Question 1 of 5

Your organisation has a two-domain forest: corp.local (root) and eu.corp.local (child). You need to create a group that contains users from both domains and assign it permissions to a file server in corp.local. Following the AGDLP model, what group configuration should you use?

AA single Global group in corp.local containing users from both domains, assigned directly to the file server share
BGlobal groups in each domain (for local users) nested into a Universal group, which is then nested into a Domain Local group in corp.local assigned to the share
CA Universal group assigned directly to the file server share with users from both domains
DAdd all users from both domains directly to a Domain Local group in corp.local

Question 2 of 5

A workstation rejoined the domain after being offline for 45 days. Users on that machine can no longer authenticate. Event logs on the DC show Kerberos errors. What is the most likely cause?

AThe user’s account password has expired after 45 days of inactivity
BThe computer account was deleted from Active Directory after 30 days of inactivity
CThe computer’s secure channel is broken — the machine’s account password has changed on the DC but the local machine still holds the old password
DThe machine’s local Administrator password has expired

Question 3 of 5

Which group scope can contain members from any domain in the forest AND be assigned permissions on resources in any domain in the forest?

AUniversal
BDomain Local
CGlobal
DDistribution

Question 4 of 5

A new hire needs to be created in AD with an account set to expire in 90 days. What is the correct PowerShell command to create the account with an expiry?

ANew-ADUser -Name 'Jane Doe' -Expires (Get-Date).AddDays(90)
BNew-ADUser -Name 'Jane Doe' -ExpiryDate (Get-Date).AddDays(90)
CNew-ADUser -Name 'Jane Doe' -PasswordExpiry (Get-Date).AddDays(90)
DNew-ADUser -Name 'Jane Doe' -AccountExpirationDate (Get-Date).AddDays(90)

Question 5 of 5

Why can’t you apply a Group Policy Object to the built-in Users or Computers container in Active Directory?

AThe built-in containers are read-only and cannot be modified by administrators
BThe built-in Users and Computers containers are not Organizational Units — GPOs can only be linked to OUs, the domain, or sites
CYou need Enterprise Admin rights to link GPOs to default containers
DGPOs linked at the domain level already apply to the Users and Computers containers, making direct GPO links redundant



🔒

This module is locked — Complete Module 1 and pass its mock test to unlock this module.
Complete the quiz above (70%+) to unlock Module 3: Organizational Units & Delegation of Control