Forum Discussion
dmello30
Feb 23, 2021Copper Contributor
Script that disable AD User Account after Login Hours expires
Hi guys, I looking for a powershell script that disable AD User Account after Login Hours expires!!! The idea is configure a task to run this script each 5 minutes. Any idea?? Is it possible to do...
AndySvints
Steel Contributor
Hello dmello30,
Can you please elaborate? What are you trying to accomplish?
Please describe your use case.
Logon hours attribute restrict the time that user is allowed to login to domain.
You want to disable user after logon hours and then enable it back again during the logon hours?
Thank you.
dmello30
Feb 24, 2021Copper Contributor
Hello AndySvints
Exactly.
I want disable user after logon hours and then enable it back again during the logon hours.
Thanks
Diogo
- farismalaebFeb 24, 2021Steel Contributor
Forgot to add the link
Check it out
http://kb.delborrell.net/2018/06/22/deploy-logon-hours-via-powershell/