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
80+ AD Commands
No Prior Experience Needed
Auto-saves Your Work
Block Search
8 Workflow Templates
Script Validator
Classroom Mode
 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 six key areas. Spend a minute getting familiar with the layout before dragging your first block.

BlockShell® Active Directory — Script Builder
Show Script Ctrl+G
Validate
Explain Script
Split View
Templates
Download Ctrl+S
Export Ctrl+E
Clear
🔍 Search blocks... (e.g. New-ADUser, group, computer)
Recent: New-ADUser Enable-ADAccount Add-ADGroupMember
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

Eight buttons across the top. Show Script (Ctrl+G) previews your generated PowerShell. Validate checks your script for common mistakes like placeholder values and destructive operations. Explain Script translates your blocks into plain English — great for learning. Split View shows a live code panel alongside your blocks. Templates loads a pre-built workflow. Download Script (Ctrl+S) saves a .ps1 file. Export Workspace (Ctrl+E) saves your blocks as JSON. Clear Workspace resets everything.

B

Block Search & Recently Used

Below the toolbar you'll find a search bar — type any cmdlet name or category (e.g. "group", "remove", "New-ADUser") to instantly find and add blocks to the workspace. Beneath that is a Recently Used strip of chips showing your last 8 blocks, so you can re-add them in one click without opening the toolbox at all.

C

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 also use the search bar above to find blocks without opening each category manually.

D

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. Zoom in/out with the mouse wheel or the +/− buttons in the corner. When Split View is active, a live code panel appears on the right showing your script update in real time as you build.

E

Cmdlet Info Panel

Whenever you drag a block onto the canvas, a Cmdlet Info Panel automatically appears in the bottom-right corner. It shows the command name, a plain-English description of what it does, and a real example of how it's used. Click the × to dismiss it, or click anywhere outside it. Coverage spans all 80+ blocks in the tool.

F

Classroom Mode

Click the 🎓 Classroom button in the top-right header to enable Classroom Mode. Enter a student name, optionally hide all destructive blocks (Remove-* / Disable-*) to create a safer learning environment, and log every block the student uses with a timestamp. Activity logs can be exported as JSON for teacher review.

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
#Requires -Modules ActiveDirectory
# Generated by BlockShell AD
# Date: 17/03/2026 14:32:05
# NOTE: Review this script carefully before running in any environment.

# Check ActiveDirectory module is available
if (-not (Get-Module -ListAvailable -Name ActiveDirectory)) {
    Write-Error "ActiveDirectory module not found. Install RSAT or run on a Domain Controller."
    exit 1
}

# Set your domain DN here (auto-detect or override manually)
$DomainDN = (Get-ADDomain).DistinguishedName

$ErrorActionPreference = "Stop"

try {
    New-ADUser -Name "Sarah Connor" -SamAccountName "sconnor" -Path "OU=Users,DC=corp,DC=com" -Enabled $true
    Enable-ADAccount -Identity "sconnor"

    Write-Host "Script completed successfully" -ForegroundColor Green
} catch {
    Write-Error "Script failed: $($_.Exception.Message)"
}
What's all that code before my commands?
BlockShell now generates production-quality script headers automatically. Every script includes: an RSAT module check (exits cleanly if ActiveDirectory isn't installed), a $DomainDN variable auto-detected from your domain, $ErrorActionPreference = "Stop" so the script halts on any error, and a try/catch block that reports exactly what went wrong. You don't need to write any of this yourself — BlockShell handles it every time you click Show Script or Download.
Use Explain Script to understand what you built
After placing your blocks, click Explain Script in the toolbar. It translates your entire block stack into numbered plain-English steps — "1. Create a new user account named Sarah Connor with login name sconnor…" — so you can verify you've built what you intended before generating the PowerShell.
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

Smart Tools & Features

BlockShell includes a suite of tools designed to help you learn faster, catch mistakes before they matter, and build scripts with confidence. Here's how to get the most from each one.

Block Search

Find any of the 80+ blocks instantly — no hunting through categories.

The search bar sits directly below the toolbar. Type a cmdlet name, verb, or keyword and results appear immediately with a colour-coded dot showing which category each block belongs to. Click a result to add that block directly to the canvas — the workspace scrolls to and selects the new block automatically.

Search tips
Try searching by verb ("Remove", "Get", "New"), by object type ("user", "group", "computer", "replication"), or by partial cmdlet name ("Password", "Account", "Expiration"). Results update as you type.

Workflow Templates

8 pre-built block sequences for the most common AD tasks.

Click Templates in the toolbar to open the template library. Each card shows the blocks included and what the workflow does. Clicking a template adds those blocks to your current workspace — you then fill in the field values for your specific scenario and generate the script.

👤 New Employee Onboarding4 blocks

Creates account, sets password, enables it, and adds to groups — the complete new starter flow.

🚪 User Offboarding3 blocks

Disable account, remove from all groups, set account expiry — the safe leaver process.

🔓 Account Unlock & Reset3 blocks

Unlock a locked-out account and reset the password in one go.

👥 New Group Setup3 blocks

Create a group and add initial members, then verify membership.

🏥 Domain Health Check4 blocks

Check domain info, forest info, all DCs, and any replication failures.

🔒 Find Locked Accounts2 blocks

Search for all locked-out accounts and display the current password policy.

🗂️ New OU Structure3 blocks

Create a parent OU and two child OUs for a new department or site.

💻 Computer Account Setup3 blocks

Pre-stage a computer, add a service account, then verify the account.

Script Validator

Catch problems before you generate your script.

Click Validate in the toolbar. The validator scans your entire workspace and reports issues in a panel colour-coded by severity. It currently checks for:

⚠️

Placeholder values

Catches blocks still containing example text like DC=domain,DC=com or domain.com — values you need to replace with your actual domain details before the script will work.

🔐

Example passwords

Flags blocks containing the example password P@ssw0rd. Never leave example passwords in scripts — they're well-known and offer no security.

🛑

Destructive operations

Alerts you when your script contains Remove-* or Disable-* blocks, and recommends testing with -WhatIf where supported before running for real.

ℹ️

RSAT requirement reminder

Every validation result includes a reminder that generated scripts require the ActiveDirectory module — either via RSAT on your workstation, or by running on a Domain Controller directly.

Explain Script

Translate your blocks into plain English before generating PowerShell.

Click Explain Script and BlockShell produces a numbered list of what your script will do in human language — using the actual values you've entered in the blocks. For example: "1. Create a new user account named Sarah Connor with login name sconnor in the OU=Users,DC=corp,DC=com container. 2. Enable the account so the user can log in."

Destructive operations are highlighted in red within the explanation. This is ideal for students to verify they've built the right thing before their instructor reviews it, and for anyone new to PowerShell who wants to be certain they understand what a script will do.

Split View — Live Code Preview

Watch your PowerShell script build in real time alongside your blocks.

Toggle Split View in the toolbar to open a dark-themed code panel on the right side of the canvas. Every time you add, remove, or change a block, the code panel updates instantly — no need to click Show Script. This is one of the most effective learning features: you can see exactly which PowerShell syntax each block produces as you build, making the connection between visual blocks and real code immediately clear. The panel also has a Copy button to grab the current script.

Best way to use Split View
Open Split View, then drag blocks from the toolbox one at a time. Watch the corresponding PowerShell line appear in the right panel with each block. This is how you learn parameter syntax without any memorisation — the blocks teach it to you automatically.

Cmdlet Info Panel

Built-in documentation for every block — auto-opens when you place one.

Every time you drag a block onto the canvas, the Cmdlet Info Panel slides in from the bottom-right. It shows three things: the cmdlet name, a plain-English description of what the command does and when you'd use it, and a formatted example showing correct PowerShell syntax. Click anywhere outside the panel or press Escape to dismiss it. Documentation is available for all 80+ blocks in the tool.

Classroom Mode

For educators and training environments — track, restrict, and log student activity.

Click the 🎓 Classroom button in the top-right corner to open the Classroom Mode settings. Once enabled, a dark banner appears across the top of the app identifying the student session. Features include:

1

Student name field

Enter the student's name — it's included in the classroom banner and in any exported activity logs, so you can match exports to the right student.

2

Hide destructive blocks

Toggle this on to remove all Remove-* and Disable-* commands from the toolbox entirely. Students can only use blocks that create, retrieve, or modify objects — preventing accidental destructive script generation in a learning context.

3

Activity log

Every block the student places on the canvas is recorded with a timestamp. The settings panel shows a summary of the most-used blocks. Logs can be exported as JSON for the instructor to review, or cleared to start a fresh session.

For instructors
Classroom Mode works entirely in the browser — no server or account required. Each student enables it on their own device. At the end of a session, ask each student to export their activity log. You'll see exactly which blocks they used, in what order, and how many times — useful for formative assessment without needing to look over their shoulder.
Section 05

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 06

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 07

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 08

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 09

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.

Click blocks to learn — use the Info Panel

Every time you drag a block onto the canvas, the Cmdlet Info Panel opens automatically with a plain-English description and real example. It's built-in documentation that covers all 80+ commands. Use it every time you're unsure what a block does.

Save workflows as templates — use the built-in ones

Open Templates in the toolbar and load a pre-built workflow for onboarding, offboarding, or domain health checks. For your own custom tasks, use Export Workspace (Ctrl+E) to save them as JSON. Import them next time to pick up exactly where you left off.

Always Validate before you Download

Hit Validate every time before downloading a script. It catches placeholder domain values, example passwords, and destructive operations that you might have overlooked. It takes one click and can save you real embarrassment in a lab or interview scenario.

Section 10

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.
$DomainDN
A PowerShell variable BlockShell auto-generates in every script: $DomainDN = (Get-ADDomain).DistinguishedName. It holds your domain's Distinguished Name so you don't have to hardcode DC=corp,DC=com in every command.
try / catch
A PowerShell error-handling structure. Code inside try { } runs normally. If any command fails, execution jumps to catch { } which reports the error. BlockShell wraps all generated scripts in try/catch automatically.
Authentication Silo
An advanced AD security feature that restricts where privileged accounts (like Domain Admins) can authenticate. Accounts in a silo can only log in to designated servers — limiting the damage if credentials are stolen.
Classroom Mode
A BlockShell feature for educators. Logs every block a student uses with a timestamp, optionally hides destructive blocks, and labels exports with the student's name. Enabled via the 🎓 Classroom button in the header.
Keyboard shortcuts
Ctrl+G — Show Script  ·  Ctrl+S — Download Script  ·  Ctrl+E — Export Workspace  ·  Escape — Close any open modal or info panel
Section 11

Quick Reference Cheat Sheet

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

Command / Action When to use it
🎓 BlockShell ToolsApp features, not PS commands
Templates buttonLoad a pre-built workflow (onboarding, offboarding, health check, etc.)
Validate buttonCheck for placeholder values, example passwords, and destructive ops before downloading
Explain Script buttonGet a plain-English summary of what your blocks will do — great before you generate
Split View buttonOpen the live code pane — watch PowerShell appear as you drag blocks
Search barFind any block instantly by typing its name or category keyword
🎓 Classroom buttonEnable student tracking, hide destructive blocks, and export activity logs
Ctrl+GShow Script — open the generated PowerShell preview modal
Ctrl+SDownload Script — save your script as a .ps1 file immediately
Ctrl+EExport Workspace — save your block layout as a JSON backup
📋 AD PowerShell CommandsWhat the blocks generate
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 (safer than Remove)
Unlock-ADAccountUser locked out after too many failed login attempts
Set-ADAccountPasswordPassword reset request from user or after a security incident
Set-ADAccountExpirationSet an end date for contractor or temporary staff accounts
Clear-ADAccountExpirationRemove expiry date when a temp worker becomes permanent staff
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
Add-ADPrincipalGroupMembershipAdd a user to multiple groups in one command — faster onboarding
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-ADForestSee the full AD forest — all domains, schema master, UPN suffixes
Get-ADDefaultDomainPasswordPolicyCheck current domain password requirements and lockout settings
Restore-ADObjectRecover an accidentally deleted user or group (requires Recycle Bin)
Get-ADReplicationFailureTroubleshoot why changes aren't appearing on all domain controllers
Sync-ADObjectForce an urgent change to replicate immediately to all DCs
Enable-ADOptionalFeatureTurn on the AD Recycle Bin on a fresh domain setup — do this first
New-ADServiceAccountCreate a gMSA for a service that needs automatic password management
Get-ADReplicationQueueOperationCheck for a replication backlog — too many items = bottleneck