Create accounts
1. Paste names
One full name per line, e.g. "Joe Bloggs" or "Smith, Jane" - or paste first and last name columns straight from Excel. Ctrl+Enter to parse.
2. Review & edit accounts
0 accountsThere are more columns to the right of the table: drag the bar under it, or hold Shift and use the mouse wheel.
| First name | Last name | Username | Display name | OU | Description | Office | Password | Home drive | Groups | Home directory | Actions |
|---|
3. Generated commands
Download the script and run it on a domain controller (or a machine with the AD module). Review it first, and try -DryRun to see what it would do. Delete it afterwards: it contains the passwords.
Reset passwords
1. Choose accounts to reset
One username per line (sign-in names/emails and DOMAIN\username are tidied up automatically) - everyone in the list gets the same Student/Staff password policy above. Ctrl+Enter to build.
Every enabled account found directly in this OU, or in any OU below it, has its password reset when the script runs - handy for a whole year group at once (e.g. an intake year's OU) when the academic year changes. Disabled accounts are left alone. Before changing anything, the script lists how many accounts it found (and the first few) and asks you to type Y - so run the downloaded .ps1 rather than pasting it into a console, where the next pasted line would answer that prompt and cancel it.
Getting the OU's distinguished name: in Active Directory Users and Computers, turn on View > Advanced Features, then right-click the OU → Properties → Attribute Editor tab → find distinguishedName and double-click it to see/copy the value. Or, from a PowerShell prompt with the AD module: Get-ADOrganizationalUnit -Filter "Name -eq 'YourOUName'" | Select-Object DistinguishedName.
2. Review & edit new passwords
0 accounts| Username | New password | Actions |
|---|
3. Generated commands
Download the script and run it on a domain controller (or a machine with the AD module). Review it first, and try -DryRun to see what it would do. Delete it afterwards: it contains the passwords.
Leavers
1. Choose the leavers
For every account, the script disables it and removes it from every group except Domain Users, then (optionally) moves it to a Leavers OU. Home folders are left alone. Accounts that are members of protected admin groups are skipped. The script lists the accounts and asks you to type Y before changing anything - run the downloaded .ps1 rather than pasting it, or try -DryRun first.
Every enabled account in it, or in any OU below it, is processed. See the Reset passwords tab for how to find an OU's distinguished name.
Created if it doesn't exist.
2. Generated commands
Download the script and run it on a domain controller (or a machine with the AD module). The script asks you to type Y before it changes anything, and writes a log of every group it removed.