Complete Beginner's Guide

Learn Active Directory
through BlockShell®

You don't need to memorise PowerShell to manage users, groups, and computers. BlockShell lets you snap blocks together and see the real script it generates — so you learn by doing, not by guessing.

9 Command Categories
70+ AD Commands
No Prior Experience Needed
Auto-saves Your Work
 In this guide
Section 01

What is Active Directory?

Before we touch BlockShell, let's understand what we're actually managing. Active Directory (AD) is Microsoft's directory service — essentially a central database that keeps track of every user, computer, group, and policy on a corporate network.

Think of it like a phone book — for your entire company
When you log in at work, your computer checks Active Directory to confirm your username and password, find out which drives and printers you can access, and apply any group policies your IT team has set. Without AD, each machine would need its own accounts.
Users
Accounts for people. Each user has a username (SamAccountName), display name, email, department, and more. You'll create, modify, enable, and disable these constantly in IT support.
Groups
Collections of users (or other groups) that share the same permissions. Instead of giving 50 people access one-by-one, you add them all to a group and grant the group access.
Computers
Workstations and servers joined to the domain. AD tracks them just like users, letting admins apply policies and remote tools to them.
Organisational Units (OUs)
Folders inside AD used to organise objects. You might have an OU called "IT Department" containing all IT user accounts and computers. Policies can be applied per-OU.
Domain
The top-level container — usually your company name like contoso.com. All users and computers that belong to the company exist within this domain.
Domain Controller (DC)
The server running Active Directory. Every login, every policy, every directory lookup goes through the DC. Large organisations have multiple DCs for redundancy.
Why PowerShell?
The graphical tool (Active Directory Users and Computers) is fine for occasional tasks. But IT professionals use PowerShell because it's faster, scriptable, and repeatable. Need to create 200 user accounts from a CSV? One script does it in seconds. BlockShell teaches you the commands by letting you build scripts visually first.
Section 02

The BlockShell Interface

When you open BlockShell AD, you'll see four key areas. Spend a minute getting familiar with the layout before dragging your first block.

BlockShell® Active Directory — Script Builder
Show Script
Download Script
Export Workspace
Import Workspace
Clear Workspace
Categories
👤 User Management
👥 Group Management
🖥 Computer Management
📁 Organisational Units
⚙️ Service Accounts
🔐 Security & Policies
🌐 Forest & Domain
🔄 Replication & Sites
🔍 Reporting / Discovery
New-ADUser  John Smith  jsmith  OU=Users,DC=corp,DC=com
Enable-ADAccount  jsmith
Add-ADGroupMember  IT Department  jsmith
A

The Toolbar

Five buttons across the top: Show Script (preview your generated PowerShell), Download Script (save as a .ps1 file), Export Workspace (save your blocks as JSON), Import Workspace (load a saved session), and Clear Workspace (start fresh — use with care!).

B

The Toolbox (left panel)

Nine colour-coded categories containing all available AD commands. Click a category to expand it and see the blocks inside. Each block represents one PowerShell command. You can scroll through to explore everything that's available.

C

The Canvas (main area)

Your workspace where blocks are placed and connected. Drag blocks from the toolbox onto the canvas. Connect them vertically to build up a sequence of commands — just like a flowchart. You can also zoom in/out with the mouse wheel or the +/− buttons in the corner.

D

Tooltips

Hover over any block on the canvas to see a tooltip explaining exactly what the command does and what each parameter means. This is one of the most powerful learning features — you get documentation without ever leaving the tool.

Section 03

Building Your First Block

Let's walk through the full process of creating a new user account — from opening the toolbox to seeing the generated PowerShell script. This takes about two minutes.

1

Open the User Management category

In the left-hand toolbox panel, click "User Management". A flyout will appear showing all available user commands. You'll see New-ADUser, Get-ADUser, Set-ADUser, and more listed as draggable blocks.

2

Drag "New-ADUser" onto the canvas

Click and hold the New-ADUser block, then drag it into the empty canvas area and release. The block will appear on the canvas with three input fields: Name, SamAccountName, and Path.

3

Fill in the fields

Click directly on each text field inside the block to edit it. Set Name to Sarah Connor, SamAccountName to sconnor (this is the login username), and Path to OU=Users,DC=corp,DC=com (the OU where the account will live). Press Enter or click away to confirm each field.

4

Add an Enable-ADAccount block below it

New accounts are disabled by default. From the toolbox, drag Enable-ADAccount and hover it just below the New-ADUser block — you'll see a connection indicator appear. Drop it to snap the blocks together. Set the Identity field to sconnor.

5

Click "Show Script" to see the PowerShell

Hit the Show Script button in the toolbar. A panel will appear showing the real PowerShell commands your blocks generate — including the date header and properly formatted parameters. You can copy it to your clipboard right there.

Generated Script — New User Onboarding
# Generated by BlockShell AD
# Date: 03/17/2026 14:32:05

New-ADUser -Name "Sarah Connor" -SamAccountName "sconnor" -Path "OU=Users,DC=corp,DC=com" -Enabled $true
Enable-ADAccount -Identity "sconnor"
What does -Enabled $true mean?
In PowerShell, $true and $false are boolean values (true/false). The -Enabled $true flag tells AD to create the account in an enabled state. BlockShell automatically adds sensible defaults like this so you don't miss important flags.
BlockShell is a learning & drafting tool
The scripts BlockShell generates are for study and practice. Always review any script carefully and test it in a safe lab environment before running it on a live domain. Never run untested scripts on production systems.
Section 04

All 9 Command Categories

BlockShell organises every AD command into nine colour-coded categories. Here's what lives in each one and when you'd use it.

User Management

Create, read, modify, and delete user accounts — the bread and butter of 1st line support.

New-ADUserNew

Creates a brand new user account in AD. Essential for onboarding new starters.

-Name-SamAccountName-Path-Enabled
Get-ADUserGet

Retrieves details about an existing user. Use to check properties like department, email, last logon.

-Identity-Properties *
Set-ADUserSet

Updates properties on an existing user — change department, title, manager, phone number etc.

-Identity-Department-Title
Remove-ADUserRemove

Permanently deletes a user account. Used for offboarding leavers. Always confirm before running!

-Identity-Confirm:$false
Enable-ADAccountEnable

Enables a disabled account. Useful for returning employees or newly created accounts.

-Identity
Disable-ADAccountDisable

Disables an account without deleting it. Standard practice when an employee leaves — disable first, delete later.

-Identity
Unlock-ADAccountUnlock

Unlocks an account locked out after too many failed password attempts. One of the most common 1st line tasks.

-Identity
Set-ADAccountPasswordSet

Resets a user's password. The new password is passed as a SecureString — BlockShell handles this conversion for you.

-Identity-NewPassword-Reset
Set-ADAccountExpirationSet

Sets a date when the account will automatically expire — useful for contractors and temporary staff.

-Identity-DateTime
Clear-ADAccountExpirationClear

Removes any expiration date from an account, making it permanent again.

-Identity

Group Management

Control who belongs to which groups — the key to managing permissions at scale.

New-ADGroupNew

Creates a new security or distribution group. You choose the scope (DomainLocal, Global, Universal) and category (Security or Distribution).

-Name-GroupScope-GroupCategory-Path
Add-ADGroupMemberAdd

Adds one or more users (or computers) to a group. Separate multiple members with commas.

-Identity-Members
Get-ADGroupMemberGet

Lists everyone in a group. Great for auditing who has access to a particular resource.

-Identity
Remove-ADGroupMemberRemove

Removes one or more users from a group — used when someone changes role or leaves a team.

-Identity-Members
Get-ADPrincipalGroupMembershipGet

Shows all groups a specific user is a member of. Handy for troubleshooting permission issues.

-Identity
Add-ADPrincipalGroupMembershipAdd

Adds a user to multiple groups in one command — more efficient than multiple Add-ADGroupMember calls.

-Identity-MemberOf

Computer Management

Manage domain-joined machines — workstations, laptops, and servers.

New-ADComputerNew

Pre-stages a computer account in AD before a machine is joined to the domain. Good practice in managed environments.

-Name-Path
Get-ADComputerGet

Retrieves details about a domain-joined computer — last logon, OS version, location, and more.

-Identity-Properties *
Set-ADComputerSet

Updates computer properties — add a description or physical location to help identify machines.

-Identity-Description-Location
Remove-ADComputerRemove

Removes a computer account from AD — used when decommissioning a machine or before re-imaging.

-Identity-Confirm:$false

Organisational Units (OUs)

Structure your AD like a filing system — group objects together for easier management and policy application.

New-ADOrganizationalUnitNew

Creates a new OU container. Use these to organise users and computers by department, location, or function.

-Name-Path
Move-ADObjectMove

Moves any AD object (user, computer, group) to a different OU. Commonly used when someone changes department.

-Identity-TargetPath
Set-ADOrganizationalUnitSet

Updates OU properties. Automatically sets ProtectedFromAccidentalDeletion — a safety feature to prevent OUs being deleted by mistake.

-Identity-Description
Rename-ADObjectRename

Renames any AD object. Useful for correcting typos or reflecting organisational changes.

-Identity-NewName

Service Accounts

Managed service accounts (MSAs / gMSAs) run background services and applications without needing a human user.

New-ADServiceAccountNew

Creates a Group Managed Service Account (gMSA) — a special account whose password is automatically managed by AD. Used for services like IIS or SQL.

-Name-DNSHostName-PrincipalsAllowed...
Install-ADServiceAccountInstall

Installs (links) a managed service account onto a specific computer so that computer can use it to run services.

-Identity

Security & Policies

Fine-grained password policies, account controls, and authentication silos for tighter security.

New-ADFineGrainedPasswordPolicyNew

Creates a custom password policy that applies to specific users or groups — useful when IT admins need stronger passwords than regular staff.

-Name-Precedence-MinPasswordLength
Set-ADAccountControlSet

Configures account flags like PasswordNeverExpires and CannotChangePassword. Useful for service accounts that should never be forced to change passwords.

-Identity-PasswordNeverExpires
Add-ADFineGrainedPasswordPolicySubjectAdd

Applies a fine-grained password policy to a specific group or user so they follow stricter (or looser) password rules than the domain default.

-Identity-Subjects
Get-ADDefaultDomainPasswordPolicyGet

Shows the default password policy for the entire domain — minimum length, complexity requirements, lockout threshold etc.

(no parameters needed)

Forest & Domain

High-level domain and forest operations — typically 2nd line and above territory.

Get-ADDomainGet

Returns information about the current domain — its name, functional level, PDC emulator, and more. Great for quickly orienting yourself in an unknown environment.

(no parameters needed)
Get-ADForestGet

Returns details about the entire AD forest — all domains, the schema master, and UPN suffixes. Useful in multi-domain environments.

(no parameters needed)
Enable-ADOptionalFeatureEnable

Enables features like the AD Recycle Bin, which allows recovery of deleted objects. A critical safety feature you'll want enabled on every domain.

-Identity-Scope-Target
Move-ADDirectoryServerOperationMasterRoleMove

Transfers FSMO roles between domain controllers — an advanced operation usually done during DC maintenance or decommissioning.

-Identity-OperationMasterRole

Replication & Sites

Manage how AD data is replicated across multiple locations and domain controllers.

New-ADReplicationSiteNew

Creates an AD site — a logical grouping representing a physical location (e.g., "London-HQ" or "Manchester-Branch"). Sites control replication schedules and logon optimisation.

-Name
Get-ADReplicationFailureGet

Lists any replication failures on a domain controller. A go-to command when troubleshooting AD changes not appearing on all DCs.

-Target
Sync-ADObjectSync

Forces replication of a single object immediately rather than waiting for the scheduled interval — useful after urgent account changes.

-Object
New-ADReplicationSiteLinkNew

Connects two AD sites with a site link, controlling how and when they replicate. The Cost value determines preference — lower cost = preferred path.

-Name-SitesIncluded-Cost

Reporting / Discovery

Search, audit, and report on the state of your AD environment.

Search-ADAccountSearch

Finds accounts by state — locked out, disabled, expired, or inactive. The pre-configured block searches for locked-out user accounts, a daily task for 1st line.

-LockedOut-UsersOnly
Get-ADDomainControllerGet

Lists all domain controllers in the domain with their site, IP address, and OS. Essential when troubleshooting or planning maintenance.

-Filter *
Get-ADObjectGet

Flexible search across all AD object types using a filter expression. Useful when you need to find something specific without knowing exactly where it lives.

-Filter-SearchBase
Restore-ADObjectRestore

Recovers a deleted AD object from the Recycle Bin. Only works if the AD Recycle Bin feature was enabled before the deletion occurred.

-Identity
Section 05

Real-World Walkthroughs

These are the situations you'll actually encounter in IT support. Follow each one in BlockShell to practise the full workflow.

Scenario 1 — New Employee Onboarding

A new marketing manager starts Monday. Create their account, add them to the right groups, and set an initial password.

1
Drag New-ADUser onto the canvas. Set Name to Emma Thompson, SamAccountName to ethompson, and Path to OU=Marketing,DC=corp,DC=com.
2
Snap Set-ADAccountPassword below it. Set Identity to ethompson and NewPassword to a temporary password like TempP@ss2026!. This uses ConvertTo-SecureString automatically.
3
Add Enable-ADAccount below that with Identity ethompson — new accounts start disabled.
4
Add Add-ADGroupMember with Identity Marketing Team and Members ethompson. Repeat for any other groups she needs.
5
Click Show Script to review the generated PowerShell. Copy it to your notes or download it as a .ps1 file.

Scenario 2 — Account Locked Out

A user rings the helpdesk saying they can't log in. Most likely a lockout after too many wrong password attempts.

1
First, verify the problem — drag Get-ADUser with Identity the.user to see all properties. The generated script outputs their account status, so you can confirm it's actually locked before doing anything.
2
Drag Unlock-ADAccount onto the canvas, set Identity to the user's SamAccountName, and snap it below the Get-ADUser block.
3
If they've also forgotten their password, add Set-ADAccountPassword below Unlock-ADAccount to reset it at the same time.
4
Show the script, review it, then run it (in your lab environment) to see the output. In the real world you'd run it on a domain-joined machine with the RSAT tools installed.

Scenario 3 — Employee Offboarding

An employee is leaving the company. Proper offboarding means disabling their account, removing group memberships, and documenting the action.

1
Start with Get-ADPrincipalGroupMembership using their username — this generates a script to list all their groups first, so you know what to remove.
2
Add Disable-ADAccount — always disable rather than delete immediately. The account may need to be accessed for data recovery.
3
Add Set-ADAccountExpiration with today's date so the account definitely can't be used even if somehow re-enabled.
4
Add Move-ADObject to move the account to a "Leavers" OU — keeping it out of the main directory whilst retaining it for 90 days per your company policy.

Scenario 4 — Creating a New Department Structure

A new department is being set up. You need to create the OU, a security group, and populate it.

1
Drag New-ADOrganizationalUnit — Name Cyber Security, Path DC=corp,DC=com.
2
Add New-ADGroup — Name Cyber Security Team, GroupScope Global, GroupCategory Security, Path pointing to your new OU.
3
Add Add-ADGroupMember blocks to populate the group with each team member's SamAccountName.
4
Export your completed workspace so you can reuse this pattern for the next department setup.
Section 06

Reading the Generated Scripts

The real value of BlockShell is that it teaches you PowerShell as you build. Here's how to read what gets generated — and what it all means.

Annotated example — New user + group membership
# Generated by BlockShell AD ← header automatically added
# Date: 03/17/2026 14:32:05

# Verb-Noun format: every PS command follows this pattern
New-ADUser
    -Name "Sarah Connor" ← display name (can have spaces)
    -SamAccountName "sconnor" ← login username (no spaces)
    -Path "OU=HR,DC=corp,DC=com" ← where in AD to put the account
    -Enabled $true ← boolean: account is active

Set-ADAccountPassword
    -Identity "sconnor"
    -NewPassword (ConvertTo-SecureString "TempP@ss2026!" -AsPlainText -Force)
    -Reset ← forces password change at next login

Add-ADGroupMember
    -Identity "HR Team" ← the group to add TO
    -Members "sconnor" ← the user being added

Verb-Noun Pattern

Every PowerShell command is Verb-Noun. The verb tells you what's happening (Get, New, Set, Remove) and the noun tells you what object is being acted on (ADUser, ADGroup).

Parameters start with -

Anything starting with a hyphen is a parameter — it's like a labelled argument. -Identity "jdoe" means "the identity I'm targeting is jdoe". Parameters tell the command exactly what to do and with what.

Quotes around strings

Text values (usernames, paths, names) are wrapped in double quotes. Values like $true, $false, and numbers don't need quotes — they're not text, they're special PowerShell types.

Comments explain the script

Lines starting with # are comments — they're ignored when the script runs. BlockShell adds a date header automatically. You should add your own comments to explain what each section does.

Understanding Distinguished Names (DN)
The -Path parameter uses Distinguished Name format: OU=HR,DC=corp,DC=com. Read it right to left — DC=com is the top-level domain, DC=corp is the domain name, OU=HR is the organisational unit. Each comma separates a level. Nesting looks like: OU=Managers,OU=HR,DC=corp,DC=com.
Section 07

Saving & Managing Your Work

BlockShell has several ways to save and share your work. Understanding the difference between them will save you from losing a complex block layout.

Auto-save (always on)

BlockShell automatically saves your workspace to your browser's local storage every second after you stop making changes. This means if you accidentally close the tab, your work will be there when you reopen the app in the same browser. This is not a backup — clearing browser data will erase it.

Export Workspace (JSON)

Saves your entire block layout as a .json file. This is your proper backup and the way to share workspaces with colleagues. Use this before making big changes. The filename includes a timestamp: blockshell_ad_workspace_1742123456789.json.

Import Workspace (JSON)

Loads a previously exported JSON file back into the canvas. Use this to pick up where you left off on another machine, or to load a template workspace your trainer has provided. The import will replace your current canvas.

Download Script (PS1)

Exports just the generated PowerShell as a blockshell_script.ps1 file — ready to be reviewed and run in a PowerShell session (with appropriate AD module access). This does not save your block layout, only the script output.

Export regularly during complex sessions
The auto-save keeps your latest state, but only one version. If you want to save multiple versions of a workspace (e.g., "onboarding-v1" and "onboarding-v2"), use Export Workspace each time and rename the files. Think of Export as "Save As" and auto-save as "Save".
Section 08

Pro Tips & Best Practices

Things you'd normally only learn after six months on the helpdesk — condensed into one page.

Always Get before you Set or Remove

Before modifying or deleting anything, run Get-ADUser (or Get-ADGroup, etc.) first to confirm you have the right object. Accidentally modifying the wrong account is a painful mistake.

Disable before Delete

Never immediately delete a leaving employee's account. Disable it, move it to a Leavers OU, and keep it for at least 30–90 days. You'll thank yourself when a manager asks for their old emails.

Connect blocks to tell a story

Blocks connected in sequence run top to bottom. Build your scripts like a checklist: create, configure, enable, add to groups. Reading it should tell you exactly what's happening step by step.

Download and study the scripts

Use the Download Script button regularly and open the .ps1 files in Notepad or VS Code. Reading the real PowerShell is how you'll eventually memorise the syntax and move beyond BlockShell.

Use standardised naming conventions

Set SamAccountNames consistently: first initial + surname (jsmith) is common. Whatever format your company uses — stick to it. Inconsistency makes AD searches a nightmare.

Test in a lab first

Run your generated scripts in a lab environment (a Windows Server VM with AD installed) before ever using them anywhere near a real domain. This is non-negotiable for any serious IT learning.

Hover for instant documentation

Don't guess what a block does — hover over it. Every block has a detailed tooltip explaining the command, what each parameter does, and when you'd use it. It's built-in documentation.

Export templates for common tasks

Build a workspace for your most common tasks (new starter, leaver, password reset) and save each as a JSON file. Next time, import it, update the names, and generate the script instantly.

Section 09

Glossary

Key terms you'll encounter when working with Active Directory and PowerShell.

SamAccountName
The short login username used on Windows networks. Typically firstname initial + surname (e.g., jsmith). Limited to 20 characters, no spaces.
Distinguished Name (DN)
The full unique path to an object in AD. E.g., CN=John Smith,OU=HR,DC=corp,DC=com. Read right to left: domain → OU → object.
UPN (User Principal Name)
The email-format login: jsmith@corp.com. Modern Windows environments often use UPN for login instead of SamAccountName.
RSAT
Remote Server Administration Tools — a free Windows feature that installs the ActiveDirectory PowerShell module on your workstation so you can run AD commands without being on the server.
FSMO Roles
Flexible Single Master Operations — five special roles in AD (PDC Emulator, RID Master, etc.) held by specific domain controllers. Only one DC can hold each role at a time.
gMSA
Group Managed Service Account — a special AD account for running services, with passwords automatically managed by AD itself. More secure than regular service accounts.
Group Scope
Defines where a group can be used. Global = within the domain. Universal = across the forest. DomainLocal = local permissions within the domain.
Replication
The process by which changes made on one domain controller (e.g., a new user account) are copied to all other DCs in the domain. Usually happens within a few minutes.
Fine-Grained Password Policy
A password policy that applies to specific users or groups, overriding the domain default. Allows different password rules for admins vs regular users.
$true / $false
PowerShell boolean values. These are not strings — they don't go in quotes. Used for on/off parameters like -Enabled $true or -PasswordNeverExpires $false.
SecureString
A special PowerShell type for handling passwords securely in memory. The ConvertTo-SecureString cmdlet (auto-added by BlockShell) converts a plain text password into this format.
AD Recycle Bin
An optional AD feature that keeps deleted objects recoverable for a set period. Must be enabled before you need it. Use Enable-ADOptionalFeature with "Recycle Bin Feature".
Section 10

Quick Reference Cheat Sheet

The most commonly used commands in BlockShell AD — at a glance.

Command When to use it
New-ADUserNew employee starting — create their account
Get-ADUserLook up user details, check account status, last logon
Set-ADUserUpdate department, title, manager after a promotion or role change
Disable-ADAccountEmployee leaves — disable immediately, delete later
Unlock-ADAccountUser locked out after too many failed login attempts
Set-ADAccountPasswordPassword reset request from user or after a security incident
Add-ADGroupMemberGrant a user access to a shared resource or application
Remove-ADGroupMemberRevoke access when someone changes role or leaves a team
Get-ADGroupMemberAudit who has access to a particular group / resource
Get-ADPrincipalGroupMembershipCheck which groups a specific user belongs to
Move-ADObjectMove a user to a different OU after a department transfer
New-ADOrganizationalUnitNew department or location needs its own container in AD
Search-ADAccount -LockedOutFind all currently locked-out accounts across the domain
Get-ADDomainControllerList all DCs — useful during troubleshooting or maintenance
Get-ADDomainGet a quick overview of domain settings and functional level
Get-ADDefaultDomainPasswordPolicyCheck current domain password requirements
Restore-ADObjectRecover an accidentally deleted user or group (requires Recycle Bin)
Set-ADAccountExpirationSet an end date for contractor or temporary staff accounts
Get-ADReplicationFailureTroubleshoot why changes aren't appearing on all domain controllers
Enable-ADOptionalFeatureTurn on the AD Recycle Bin on a fresh domain setup