Hi,
Here are commands to enable and disable ad user accounts.
For your reference:
https://www.lepide.com/how-to/unlock-enable-disable-ad-accounts-with-powershell.html
Then you can use gpp to deploy a task schedule for the computers ,following link for your reference:
https://www.faqforge.com/windows-server-2016/configure-scheduled-task-item-using-group-policy/
This response contains a third-party link. We provide this link for easy reference. Microsoft cannot guarantee the validity of any information and content in this link.
Best Regards,