Новый курс! Каждый программист должен знать генеративный ИИ!
Попробуйте бесплатный урок+ 1
How to set AD user account expiration date in powershell using only samaccount name
1 ответ
0
$Username = "samaccountname"
$ExpirationDate = (Get-Date).AddDays(1)
Set-ADUser -Identity $Username -AccountExpirationDate $ExpirationDate