Neuer Kurs! Jeder Programmierer sollte generative KI lernen!
Kostenlose Lektion ausprobieren+ 1
How to set AD user account expiration date in powershell using only samaccount name
1 Antwort
0
$Username = "samaccountname"
$ExpirationDate = (Get-Date).AddDays(1)
Set-ADUser -Identity $Username -AccountExpirationDate $ExpirationDate