Windows domain force user log off
An easy way to do this is to set a log on hours restriction in Active Directory then set the default domain security policy to force log off when user log on hour expires.
You can find the policy setting in Administrative Tools> Domain Security Policy> Local Policies> Security Options> Network security: Force logoff when logon hours expire
Alternatively you can set it from GPO: \Computer Configuration\ Windows Settings\ Security Settings\ Local
Policies\ Security Options\ Network Security: Force logoff when logon hours
expire
I’m not sure which takes preference though so you’ll just have to try it and find out.