Intermediate Pro Subscription Required

Windows Domain in Practice: The Rules Behind Accounts, Policies and Directory Health

Learn how a Windows domain is really audited and run, with Python on invented directory data in your browser. Find stale accounts with the 14-day lag of lastLogonTimestamp, expand nested groups and cycles, resolve Group Policy precedence with link order, Block Inheritance and Enforced, size a DHCP scope, check a DNS zone, test Kerberos clock skew and ticket lifetime, compute replication time across sites, work out effective share and NTFS permissions, and review the health of the domain controllers and the five FSMO roles. The data is generated for you alone, and the functions you write also run on data you cannot see. Three console jobs then let you do the same work at a simulated PowerShell prompt on an Active Directory: sweep the leavers and unused accounts, fix a privileged group, and unlock four people who cannot sign in.

6-8 hours of study Builds toward: Systems Administrator 12 modules

Practise on your own computer

The labs in the lessons run in your browser. To repeat them, go further and try the capstone on your own machine, set up the environment with these free guides:

A Windows domain is one directory that decides who people are and what they may do. Its failures are rarely dramatic: an account that nobody disabled, a group inside a group, a policy that quietly loses, a scope that fills up, a record that is there twice, a clock that drifted five minutes, a change that has not arrived yet. Each is a small rule that is easy to get slightly wrong, and each shows up on a bad Monday or in an audit.

This is the eighteenth season of Sabi Logistics’ story, told from the directory. Musa, Chidi, Ifeoma, Emeka and Halima bring you problems from the day-to-day work. Every case gives you generated exports, topologies or lists, a starter script, and checks that read what your Python leaves behind. The functions that you write are also run on hidden data, with the edges that real directories find first: an account exactly 104 days old, a skew of exactly five minutes, a lease on a reserved address, two groups that contain each other, a clean domain.

You need nothing installed. Everything uses the Python standard library (json, datetime) and runs in your browser (about 10 MB the first time). All accounts, groups and people are invented: never use real ones.

What you need first

The case files use Python (it runs in your browser, nothing to install). You should be comfortable with variables, lists, dictionaries, loops and functions. If you are not yet, read the Python primer for the case files first (it takes about an hour), or take the free course Python for Case Files, which teaches the same ideas with nine small hands-on jobs.

Every lab starts with a how to do this lab panel: the steps, what each answer must look like (its shape, never its value), and the first lines of your own files. A wrong answer comes with a hint, and when every answer is right you can see one good way to write it. These labs teach the rules and edge cases behind the real tools, and how to automate an audit with a script. Each lesson ends with a box of the real commands that you would type on a real system.

What you will learn

  1. Audit accounts: stale, never used and password-never-expires, with the lag of lastLogonTimestamp.
  2. Expand nested groups: the real members, cycles and depth.
  3. Resolve policy: LSDOU, link order, Block Inheritance and Enforced.
  4. Size a DHCP scope: pool, leases, conflicts and utilisation.
  5. Clean a DNS zone: duplicates, CNAME conflicts, missing PTR and low TTL.
  6. Respect time: Kerberos skew, ticket life and renewal.
  7. Time replication: the fastest route across sites.
  8. Combine permissions: share, NTFS, Everyone and deny.
  9. Review the domain: controllers, lag, the five roles and single-controller sites.

The console jobs

The last three lessons are different. They give you a simulated PowerShell prompt on a generated Active Directory, and you type the real cmdlets (Get-ADUser, Search-ADAccount, Get-ADGroupMember -Recursive, Disable-ADAccount, Move-ADObject, Unlock-ADAccount) with pipelines, exactly as on a domain controller. The simulator copies the real traps: a property such as LastLogonDate is only returned if you ask for it with -Properties, Remove-ADGroupMember wants -Confirm:$false, and Move-ADObject wants distinguished names. The checks read the state of the directory, so a right idea done to the wrong people fails. No Python is needed for these three.

How it works

Each case is a call from someone at Sabi Logistics, a short brief, a lab with a starter script, a twist and a debrief that says what a senior administrator would do next. Write the Python, run it, press Check my answers, and fix what the checker tells you. When every check passes you get a case reference to submit, and a short write-up to practise explaining your work to the person who asked for it.

The capstone asks you to audit a small domain of your own, with data you are allowed to use, and to say honestly what you found and what you could not see.