How to deactivate ad user to a specific time?

Viewed 38

I would like to know how to deactivate accounts at a specific time, because I would like to run a script on a server to deactivate accounts from another time zone. Thank you for your help.

$Datetime = "09:06:2022 05:00:00" #'mm:dd:yyyy hh:mm:ss'
Set-ADAccountExpiration -Identity "test.user" -DateTime $Datetime
0 Answers
Related