Admin Power
Chapter 11 of 18
Chapter 11: Manage People, Computers, and Names
This chapter is about Active Directory, the directory that keeps track of users, computers, groups, and organisational units in a domain. You will learn how to create and read user accounts, join computers to a domain, organise things into units and groups, and understand how forests, domains, and domain controllers fit together. You will also learn how DNS, the naming system, helps computers find each other in a domain. A clear warning runs through this chapter, and it matters: these commands need a proper server environment, the Active Directory module, and the right permissions, so do not try them on a normal workstation. By the end, you will be able to explain the main building blocks of a domain, and to read and manage them safely in a lab server environment.
6 lessons 3 learning objectives 1 diagram 19 related commands
Topics at a glance: AD users: create, read, change, and remove, AD computers: join, read, and disconnect, Forest, domain, and domain controllers, RootDSE and why DCPromo fails, Organisational units and groups, DNS records and zones.
Where this chapter fits
This chapter comes after Chapter 10: Run Commands on Other Computers in the journey, so ideas from that chapter will feel familiar here.
After this chapter comes Chapter 12: Let the Computer Do the Work on Time.
Learning objectives
By the end of this chapter, you will be able to:
- Manage AD users, computers, OUs, and groups with PowerShell
- Explain forests, domains, and domain controllers
- Manage DNS records and zones for a domain
Lessons in this chapter
Work through the lessons in order. Each lesson page has explanations, examples, common mistakes, and a knowledge check.
Lesson 1: AD users: create, read, change, and remove
User accounts live in Active Directory as objects. The AD user cmdlets create, read, change, and remove them, and they need the Active Directory module and domain permissions.
3 things to learn in this lesson
Lesson 2: AD computers: join, read, and disconnect
Computers join a domain as computer objects. Add-Computer joins a computer, and the domain keeps a trust relationship with it, which can break if the computer is offline too long or is reset badly.
3 things to learn in this lesson
Lesson 3: Forest, domain, and domain controllers
A forest is the top level of Active Directory. It holds domains, and each domain holds domain controllers, which are the servers that answer logon and directory requests.
3 things to learn in this lesson
Lesson 4: RootDSE and why DCPromo fails
RootDSE tells you what a directory server offers. DCPromo is the older promotion tool, and its failures usually come from DNS, permissions, or network basics, not from the tool itself.
3 things to learn in this lesson
Lesson 5: Organisational units and groups
Organisational units organise objects inside a domain, and groups collect users so permissions can be given once, to the group, instead of to each user.
3 things to learn in this lesson
Lesson 6: DNS records and zones
DNS turns names into addresses. In an Active Directory domain, DNS zones and records are the reason computers can find domain controllers and services by name.
3 things to learn in this lesson
Diagrams in this chapter
These diagrams come from lessons in this chapter. Tap a stage in a diagram to see what it does.
Active Directory structure (from the lesson: AD users: create, read, change, and remove)
Choose a stage above to see what it does.
Related command references
These command pages are linked to lessons in this chapter. Each command page has its syntax, parameters, and examples.
Get-LocalUser
Lists local user accounts on one computer.
From the lesson: AD users: create, read, change, and remove
Test-Connection
Tests network connectivity to a computer, similar to ping.
From the lesson: RootDSE and why DCPromo fails
Get-ADUser
Reads Active Directory user objects.
From the lesson: AD users: create, read, change, and remove
New-ADUser
Creates an Active Directory user.
From the lesson: AD users: create, read, change, and remove
Set-ADUser
Changes an Active Directory user, such as title or department.
From the lesson: AD users: create, read, change, and remove
Remove-ADUser
Deletes an Active Directory user. Hard to undo, so confirm first.
From the lesson: AD users: create, read, change, and remove
Add-Computer
Joins a computer to a domain, or to a workgroup.
From the lesson: AD computers: join, read, and disconnect
Get-ADComputer
Reads Active Directory computer objects.
From the lesson: AD computers: join, read, and disconnect
New-ADOrganizationalUnit
Creates an organisational unit in Active Directory.
From the lesson: Organisational units and groups
New-ADGroup
Creates an Active Directory group.
From the lesson: Organisational units and groups
Test-ADDSDomainInstallation
Tests whether a forest install can succeed, without installing.
From the lesson: Forest, domain, and domain controllers
Test-ADDSDomainControllerInstallation
Tests whether adding a domain controller can succeed, without installing.
From the lesson: Forest, domain, and domain controllers
Install-ADDSForest
Creates a new forest and its first domain. Server only.
From the lesson: Forest, domain, and domain controllers
Install-ADDSDomainController
Adds a domain controller to an existing domain. Server only.
From the lesson: Forest, domain, and domain controllers
Get-ADDomainController
Lists domain controllers in a domain.
From the lesson: Forest, domain, and domain controllers
Get-ADRootDSE
Reads RootDSE facts about a directory server.
From the lesson: RootDSE and why DCPromo fails
Add-DnsServerResourceRecord
Creates a DNS resource record on a DNS server.
From the lesson: DNS records and zones
Get-DnsServerZone
Lists DNS zones on a DNS server.
From the lesson: DNS records and zones
New-DnsServerZone
Creates a DNS zone on a DNS server.
From the lesson: DNS records and zones
Tip: read the lesson first, then use the command page as a quick reference.