Pcornel
Automation · Active Directory Automation

User Provisioning

Cheat sheet · https://pcornel.dk/topic.php?topic=5687

Back to the Topic

Answer

User provisioning creates AD accounts with New-ADUser — name, UPN, OU, groups, attributes and initial password — from HR data or a form, and disables and cleans them up when people leave.

Remember

  • Generate unique sAMAccountName and UPN.
  • Set initial password securely and force change.
  • Add groups by role.

First checks

  • New-ADUser -Name <n> -SamAccountName <s> -Path <OU> -Enabled $false -WhatIf — create preview
  • Get-ADUser <s> -Properties * — verify
  • HR feed/IGA as source — authoritative

Commands

Get-ADUser <identity> -Properties Enabled,MemberOf,whenCreated,whenChanged
Read-only/validation observation for directory identity existence, enabled state, group membership and change timestamp…

Verify in this order

HR event → validate → create user → groups → enable

Where it usually breaks

Input/desired state → request accepted → job/task terminal status → target object read-back → effective runtime state → original workload → regression/rollback readiness.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=5687

Confirmation

Confirm action

Continue?