I am working on a cmd script which needs to the change local machine policies when a user who is connected to the domain logs on. I have been able to make it work with domain admins accounts. But it is not working when trying same with standard users. Here is my script:
net accounts /lockoutthreshold:3
net accounts /lockoutduration:30
net accounts /lockoutwindow:30
To make it work without prompt and as administrator, I created a shortcut then I went to Advanced settings tab on it and tick the Run as Administrator checkbox.
Kindly advise if there a way which i could make it work for standard users as well? Like a one command line so that despite a standard user is logging in, it would run the bat file. Or any other way around.
Thanks in advance for your help.