AskTechGurus Get help now →

PowerShell & Scripting Errors

Bulk-creating AD users from a CSV fails or leaves accounts disabled

A script that imports new hires from a spreadsheet throws errors like 'bad syntax' or 'directory object not found', or creates the accounts but they're disabled and can't log in.

What you’re seeing

  • The import script stops with messages such as 'The search filter cannot be recognized', 'bad syntax' or 'Directory object not found'.
  • Some rows from the spreadsheet become accounts and others are skipped with no clear reason.
  • New hires show up in Active Directory with a down-arrow icon, meaning the account is disabled.
  • First-day staff cannot sign in even though their usernames appear correct.
  • Names with accents, apostrophes or extra spaces come through garbled or fail entirely.

Common causes

Every environment is different, but these are the causes our engineers find most often:

  • The target OU path in the spreadsheet is misspelled or points to an organizational unit that no longer exists.
  • Passwords in the file do not meet the domain's complexity or length policy, so accounts are created but left disabled.
  • The CSV was saved from Excel with the wrong encoding or delimiter, which scrambles columns and special characters.
  • Duplicate usernames or UPNs collide with existing accounts, causing those rows to be rejected.
  • Column headers in the file do not match the attribute names the script expects.
  • The account running the import lacks permission to create users in the chosen OU.

Why it matters

Onboarding is usually the first impression a new employee has of your company. When a bulk import half-works, people arrive on day one with no way to log in, managers lose a morning of productivity, and someone ends up building accounts by hand under pressure. Hand-built accounts often miss group memberships, mailbox licenses or security settings, which creates access gaps and audit headaches later. A broken script also tends to be rerun repeatedly, producing duplicate or orphaned accounts that clutter the directory and make it harder to see who really has access.

How AskTechGurus fixes it

Skip the trial and error. A certified engineer works on your actual system, finds the root cause, and fixes it properly.

Tell us what’s happening

Submit a ticket in about two minutes. Paste the error, describe what changed, and pick your tier. No charge to submit.

A certified engineer diagnoses it

A vetted, US-based systems engineer claims your ticket, usually within minutes during business hours, and investigates over a secure remote session you can watch and end at any time.

Fixed and verified with you

The engineer resolves the root cause and confirms with you that it’s working. You don’t just get a workaround, and you get a plain-English summary of what was wrong.

Pay only when it’s resolved

Fixed price from $99, invoiced only after you approve the fix. If it isn’t resolved, you don’t pay.

Frequently asked questions

Why were the accounts created but left disabled?

Active Directory will create a user even when the supplied password fails policy, but it leaves the account switched off for safety. The password rules and the data in the spreadsheet need to line up before the import works cleanly.

Is it safe to keep rerunning the import?

Repeated runs can create duplicates or overwrite details on accounts that already worked. It is better to have the file and script reviewed first so the next run is the last one.

Can AskTechGurus fix our onboarding import?

Yes. A certified US engineer can review your script and spreadsheet over a remote secure session, starting from $99, and you pay only when the import is working.

Still stuck? Let a pro take it from here.

AskTechGurus connects you with vetted, US-based systems engineers who fix this every day. No call centers, no scripts, no surprise bills.

Start now →