Windows 11 How to prevent login for all users during spesific time intervals

Viewed 32

I want to stop myself from using the computer at night, by preventing a login.

Windows 11 Home 21H2 laptop

I tried this command for all users, even Administrator and utility's and nothing happens and i can login normally at all times.

net user <username> /times:<days, times>

When i print the current user:

net user $env:UserName

I get this. Same for all other accounts, the allowed logon hours are correct but they never logon!

All help is greatly appreciated.

0 Answers
Related