Use Template

Opens this plan in Hirezen, where one click makes it a position.

System Administrator interview questionsScripting — the offboarding script round

A 60 min interview plan with a time-boxed script, what each question is for, and the signals to score against. Key skills: PowerShell offboarding script review and rewrite: a leaver script that matched on a surname and disabled two people, swallowed the error that should have ended the leaver's sessions, and missed access no directory script can reach — whether the candidate reconstructs what happened from logs, writes automation that refuses to guess, and closes access across the directory, the cloud and everything outside both..

Friday 17:14 to Monday 08:30

15 min
What this section is for

Purpose

Runs over a printed script, its run log and four pieces of weekend evidence, handed over together at the start. Write the script yourself so you know exactly what is in it: `Invoke-Offboarding.ps1`, run by the service desk with one parameter, `-Surname`. It finds accounts with `Get-ADUser -Filter "Surname -like '*$Surname*'" -Properties MemberOf`. Before the loop it asks the cloud identity service for a token with an app registration's client secret, inside `try { } catch { }` with an empty catch, and builds the authorisation header from whatever came back. For each account found it runs `Disable-ADAccount`; resets the password with `Set-ADAccountPassword -Reset` to the same fixed string, `Leaver-2026!`, for every leaver; removes every group in `MemberOf` with `Remove-ADGroupMember -Confirm:$false`, recording nothing; moves the account to `OU=Leavers`; calls the cloud endpoint that revokes a user's sign-in sessions inside another empty catch; and then writes one log line saying the account was disabled, groups removed and sessions revoked. The run log, Friday: "17:14:02 mokafor: disabled, groups removed, sessions revoked", "17:14:03 cokafor-reid: disabled, groups removed, sessions revoked". The evidence. One: a service desk ticket, Saturday 09:10 — Chidi Okafor-Reid in Sales cannot sign in; the on-call engineer re-enabled him at 09:25 and added "the usual Sales groups"; on Monday he cannot open two Sales folders he used last week. Two: Task Scheduler on `APP02`, Monday 06:00 — the task `\Finance\AP-Export` failed to start for `CORP\mokafor` because the account is disabled. Three: the cloud sign-in log for `mokafor` — Friday 17:31, successful, the mail app on a personal phone; Friday 18:02 and Saturday 10:12, failed, account disabled. Four: a note that directory changes sync to the cloud every 30 minutes, with a cycle at 17:10 and the next at 17:40; and that the client secret the script uses expired on 14 March. Deliberately correct, and a red herring for anyone who wants to delete things: the script keeps leavers disabled in `OU=Leavers` for 90 days rather than deleting them. The payroll provider's portal, which uses its own username and password and lists `mokafor` as one of its two administrators, is on the application inventory and is kept back until the last section. Book 70 minutes; the close is outside the 60.

I'm [YOUR_NAME] and I run identity and the servers at [COMPANY_NAME]. This is a scripting hour, but you will read before you write. Mira Okafor left finance on Friday, and the service desk ran our offboarding script. Here is the script, its log, and what happened over the weekend.

What this section is for

Purpose

Tells the candidate reading comes first, so a candidate who prepared to write code from a blank page spends the opening minutes on the evidence.

Using the script, the run log and the weekend's evidence, tell me what actually happened between Friday 17:14 and Monday 08:30 — to Mira's access, and to everyone else.

What this question is for, and what to listen for

Purpose

Reads troubleshooting from evidence where the log itself is wrong. The separator is whether the candidate trusts the evidence over the log line the script wrote about itself.

Signals to score

  • Finds the surname wildcard and explains how `*Okafor*` matched `cokafor-reid` as well as `mokafor`
  • Concludes that Chidi was disabled, stripped of every group and had his password reset, and that nobody knows what he had
  • Reads the run log's "sessions revoked" as written unconditionally, and shows from the code that it proves nothing
  • Connects the expired client secret and the empty catch blocks to the revocation never happening
  • Explains the successful 17:31 sign-in from the unrevoked session and the cloud account still enabled until the 17:40 sync
  • Treats the failed sign-ins at 18:02 and on Saturday as the sync taking effect, and does not read them as Mira attempting something without more evidence
  • Identifies the AP export as a business process running under a person's account, which disabling her broke
  • Leaves the 90-day retention in `OU=Leavers` alone and says why deleting the account would have been worse
  • Separates harm already done from harm still in progress, and deals with the second first

Follow-up questions

  • The log says sessions were revoked. How do you know whether they were?
  • Who is Chidi, and why was he in this script's loop?
  • What happened at 17:31, and why did it stop by 18:02?
  • Why did the finance export fail on Monday, and whose fault is the design?
  • Would it have been better if the script deleted leavers instead?

Make it refuse to guess

25 min
What this section is for

Purpose

The writing section. The candidate edits or rewrites the script on a laptop or on paper; PowerShell is the natural language here, and a candidate who scripts in something else may write in that and name the equivalents. Nothing needs to run. Score whether it would do the right thing when it is wrong about the input, not its style. Leave the payroll portal out of this section.

Rewrite the part of the script that finds the account and changes it, so that Friday cannot happen again. Keep the parts you think are right. Talk while you write if that helps you.

What this section is for

Purpose

Sets the deliverable as a change to an existing script rather than a clean exercise, which is how offboarding scripts are really maintained, and leaves the choice of what to keep to the candidate.

Write the new version of the lookup and the loop. When it is finished, tell me what it does with Friday's input, what it does if the cloud call fails, and what the log says in each case.

What this question is for, and what to listen for

Purpose

Reads scripting and automation at the standard a script needs when it changes accounts in bulk. The separator is whether failures become stops and whether a mistake can be undone.

Signals to score

  • Takes an identifier that is unique by construction — employee ID, account name or UPN from the HR request — instead of a surname
  • Matches exactly and stops unless exactly one account is found, printing what it did find
  • Adds a dry run that lists every change without making it, through `-WhatIf` support or an explicit switch
  • Writes the account's groups, OU and state to a file before changing anything, so a mistake can be put back exactly
  • Makes directory failures stop the script with `-ErrorAction Stop` and removes the empty catch blocks
  • Checks the result of the session revocation and records a failure as a failure, with the account named for follow-up
  • Writes a log line per step saying what was attempted and what happened, not one summary written regardless
  • Replaces the shared fixed password with a random one, or drops the reset and says why the disable is enough
  • Moves the cloud credential out of the script and makes its expiry something that alerts before it happens
  • Makes a second run on the same account harmless

Follow-up questions

  • Friday's input was a surname. What does your version take, and where does it come from?
  • Your lookup finds two accounts. What happens?
  • The token request fails. Walk me through what your script does next.
  • Someone runs it on the wrong person. How do you put them back as they were?
  • Why is `Leaver-2026!` a problem even though the account is disabled?

What a directory script cannot reach

20 min
What this section is for

Purpose

Hand over the application inventory now: twelve applications, of which eight sign in through the company's single sign-on and four do not. The rows that matter: the payroll provider's portal, its own usernames and passwords, administrators `mokafor` and the head of finance, and account recovery by the email address and mobile number each administrator registered; and the supplier payments portal, used by the accounts payable team through one shared login whose password lives in a spreadsheet on the finance share. Add one line from the device management console: Mira's personal phone was enrolled for company mail and files. The AP export task from the first section is still failing.

It is Monday, 08:30. What access does Mira still have that no directory script would have removed, what do you do about each piece today, and how do you make sure the next leaver's list is complete without relying on anyone's memory?

What this question is for, and what to listen for

Purpose

Reads identity and access across the whole estate rather than the directory alone. The separator is whether the candidate thinks in terms of every way a person can still act as themselves — accounts, shared secrets, devices, processes — and makes the list come from a record.

Signals to score

  • Finds the payroll portal administrator account and has it disabled at the provider today, through the other administrator
  • Checks that the portal's account recovery cannot be used from her personal email or phone
  • Rotates the shared supplier portal password she knew, and moves it out of a spreadsheet into a managed store with named users
  • Moves the AP export to a service identity with an owner, and looks for other tasks and services running as people
  • Removes company mail and files from her personal phone through device management
  • Uses the mail and file audit logs to see what the unrevoked session touched after 17:14, and records the answer either way
  • Makes HR's record of the leaving date the trigger for offboarding, rather than a ticket someone has to remember
  • Keeps the application inventory with an owner per application, moves applications to single sign-on where they support it, and reviews access to the rest on a schedule
  • Applies the same thinking to movers, using Chidi's lost access to argue for groups that come from the role

Follow-up questions

  • The payroll portal has its own sign-in. What did disabling her directory account do to it?
  • The accounts payable team shares one supplier portal password. What happens to it today?
  • Who should the AP export run as?
  • How would you find out whether the session at 17:31 read anything?
  • Where does next month's leaver list come from?

That is everything I have. Ask me anything about how access works here — who owns the application inventory, how leavers reach us, how many scripts like this one are still running.

What this section is for

Purpose

Scores nothing and goes in the notes. A candidate who has closed accounts for real tends to ask where the leaver list comes from and which applications sit outside single sign-on.

Before you go, something true about us: [name one real gap in your own joiner, mover and leaver process — an application nobody has put behind single sign-on, a task running as a former employee, a shared password still in use]. It is the kind of thing you would be fixing here.

What this section is for

Purpose

Ends on a real, current weakness rather than a pitch; it is what the candidate this round is for wants to know, and it only works if it is still true, so check it first.

System Administrator interviews — common questions

Who is this System Administrator interview plan for?
It is written for the interviewer, not the candidate: the hiring manager, engineer or panel member running the Scripting — the offboarding script round for a System Administrator role. It gives you a 60 min script to follow in the conversation — 3 questions with what each one is for and the signals to score against — so you are not writing the round from scratch the night before.
What does the Scripting — the offboarding script round assess?
This round is focused on: PowerShell offboarding script review and rewrite: a leaver script that matched on a surname and disabled two people, swallowed the error that should have ended the leaver's sessions, and missed access no directory script can reach — whether the candidate reconstructs what happened from logs, writes automation that refuses to guess, and closes access across the directory, the cloud and everything outside both.. It works through Friday 17:14 to Monday 08:30, Make it refuse to guess and What a directory script cannot reach, scoring against 28 observable signals, with follow-up prompts on all 3 questions for going deeper where an answer is thin.
How is the 60 min split up?
Friday 17:14 to Monday 08:30 (15 min), Make it refuse to guess (25 min), What a directory script cannot reach (20 min). The timings are there so the round stays on schedule and every candidate gets the same shape of interview — which is what makes two candidates comparable afterwards.
What other rounds should I run for a System Administrator?

A single round does not cover a whole role. The other rounds in this library for a System Administrator: