Set-ADAccountExpiration
CautionAccount expiration dates
Set-ADAccountExpiration -Identity <user> -DateTime '<date>'
Sets auto-expiry for contractors — accounts die on schedule instead of haunting your audits.
Examples
Set-ADAccountExpiration -Identity vendor01 -DateTime '2026-09-30'Expire at contract end
Syntax
Set-ADAccountExpiration -Identity u -DateTime d / Clear-ADAccountExpiration
Before you run it
They can't log on past the date — align expectations.
Related commands
- Disable-ADAccountDisable accounts
- Search-ADAccountFind problem accounts
The same reference, with no signal at all
Every command and flow from this site, held on your device and searchable with no connection. Free to install, no ads.
Get it free on the App Store