JAEN

Active Directory

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

The same reference, with no signal at all

Every command on this site, held on your device. The app adds 632 more: 1,510 commands and 120 fix flows, searchable with no connection. Free to install, no ads (some content is a one-time purchase).

Get it free on the App Store