Delegated User Manager
A one-window app that lets two trusted staff at Custom Wheel Connection add people, reset passwords and offboard them in Active Directory without being domain admins. It runs on any domain PC, needs nothing installed, and logs every action.
- Role
- Design, build, deployment and support
- Client
- Custom Wheel Connection, Inc. (10 PCs), 2 trusted staff
- Stack
- Windows PowerShell 5.1, WinForms, .NET AccountManagement
- In use
- Since October 2026
- Tests
- 38 automated checks
The problem
After I moved Custom Wheel Connection from shared passwords onto Active Directory, everyday account work needed a domain admin, and there's no IT person on site. A forgotten password or a locked account at opening time meant waiting for me while a terminal sat idle.
Making a manager a Domain Admin would hand one person the keys to every server, backup and admin account, and defeat the purpose of the move. The built-in tools (Active Directory Users and Computers, PowerShell) also assume IT knowledge and offer far more than anyone at the counter should touch. The shop needed three things at once:
- Speed: a trusted staff member fixes a password or adds a new hire in under a minute.
- Containment: that person can never change an admin account or give themselves admin rights.
- Accountability: every change is recorded, and nothing gets deleted by mistake.
What it does
One window, five tabs, each with a single job. The title bar always shows who is signed in and at what level.








The tab screenshots are from the live tool at the shop, and the two sign-in screenshots are from an earlier version. Staff names, account names, the domain and a sample password are pixelated. Click a screenshot to see it full size.
Who can do what
There are three kinds of account. Regular staff have the Normal or Limited role and can't manage anyone. SuperUsers are the two trusted staff who manage everyday accounts. Admins are IT, with a separate account kept for admin work.
| Action | SuperUser, on regular staff | SuperUser, on another SuperUser | SuperUser, on an Admin | Admin, on anyone |
|---|---|---|---|---|
| Create user | Yes (Normal/Limited roles only) | — | — | Yes, any role |
| Reset password | Yes | Yes | No | Yes |
| Unlock / disable / re-enable | Yes | No | No | Yes |
| Change role | To Normal/Limited | No | No | Any role |
Nobody can change their own account. If someone is in two role groups, the higher one counts, and Domain Admins always count as Admin. SuperUsers can only act on staff accounts, not service or built-in accounts elsewhere in the domain.
What happens when someone leaves
The account is never deleted. The app blocks sign-in, records the person's old role, groups and the reason on the account, removes every group except Domain Users, and moves it to a Disabled Users folder, so a disabled account can't keep admin rights. If the person comes back, someone has to pick one role to give them again. A disabled account is judged by the role recorded when it was disabled, so a SuperUser can't bring back a former Admin.
How it's built
It's a single PowerShell script with a Windows Forms window, about 800 lines, running on the Windows PowerShell 5.1 that's already on every Windows PC.
- No installs. It talks to Active Directory through .NET's System.DirectoryServices.AccountManagement, so the PCs don't need RSAT or the AD PowerShell module.
- One copy, everywhere. The script lives in the domain's NETLOGON share and a desktop icon points to it, so an update reaches every PC at once.
- Works outside a domain session. Run under a local account, it shows its own sign-in window and connects with the domain login typed there.
- Settings, not hard-coding. Folder paths, group names, password length and the audit-log location come from a defaults table that a config file can override.
- Testable rules. Username building, role ranking, "can this person act on this account?" and password generation are plain functions. A
-NoGuiswitch loads them without the window so they can be tested on their own. - Plain-English errors. A weak password, "access denied" or an unreachable domain controller each get a message that says what to do next.
Security model
The window is a convenience, not the security boundary. The real limit is Active Directory itself, so someone who skips the app can't do more than it allows. The README lists the exact rights SuperUsers need: resetting passwords, editing a few account fields, and adding people to the two standard role groups. At first the SuperUsers' AD rights were broader than that. I've since narrowed them to exactly those grants on the staff Users folder, plus joining PCs in the Workstations folder, and nothing at the domain level.
- Before every action, the app checks the user's current groups again instead of trusting what's on screen.
- Temporary passwords are 14 characters from a cryptographic random generator, with every character type and no look-alikes such as 0/O or 1/l. They're wiped from the screen and the clipboard once used, and the person must change them at first sign-in.
- Every action, including every blocked attempt, writes a line to a CSV audit log: time, operator, computer, action, target and result. Passwords are never logged.
- Domain Admins are protected by AD's AdminSDHolder, which overwrites any delegated permission on them. When the app promotes someone to Admin, it applies that protection right away instead of waiting up to an hour.
- The script is set up to be code-signed and run under an AllSigned policy, so an altered copy won't run.
- My Access Review Tool can catch accounts that slip through.
What real use taught me
- Test from the account people will actually use. Sign-in checks that passed in my admin session failed when the tool ran under a local account on the server. Checking with a real directory lookup, instead of a credential check, fixed it.
- PowerShell quietly turns $null into an empty string when it calls .NET. An empty folder path produced a cryptic "Unknown error (0x80005000)". The fix was to always pass a real path.
- Small UI details stop people cold. The standard credential prompt sometimes opened behind other windows and looked like a freeze, so the tool now has its own always-on-top sign-in box.
- Test the layout at real screen sizes. On the Manage users tab, the row of action buttons can be pushed out of view, and some hint text gets cut off. The same jobs are on their own tabs, and fixing the layout is the next change.
How I used AI
I built this with Claude Code. I decided the roles and who can act on whom. The 38 automated tests cover username building, role and permission rules, temporary passwords and audit records. A review pass also found problems I fixed: passwords left in the clipboard, and no warning before resetting a disabled account. How I check AI's work.
What I'd do next
- Fix the Manage users layout
- Add MFA for admin accounts
- Run the Access Review Tool at the shop each quarter, so the owner signs off on who has access to what
- A scheduled report of accounts disabled for 90+ days, so they can be cleaned up
Related
Custom Wheel Connection IT Overhaul and Security Automation at the same shop.
Questions about this project? Email [email protected].