Nowy kurs! Każdy programista powinien nauczyć się Generative AI!
Wypróbuj darmową lekcję+ 1
How to set AD user account expiration date in powershell using only samaccount name
1 Odpowiedź
0
$Username = "samaccountname"
$ExpirationDate = (Get-Date).AddDays(1)
Set-ADUser -Identity $Username -AccountExpirationDate $ExpirationDate