I have written a script that enables me to create a scheduled task and restart a server at a suitable time for the business. However, i also need to be able to logon to the server and then allow it to lock it. Locking it can occur by default timeout and this is fine.
I have read articles about adjusting the registry for automatic logon but, i do not want this to happen for anyone at anytime. Therefore, i need to be able to run the automatic logon from my script just once. I do not want someone to be able to restart the server for it to be able to log them straight in. I have been informed by a colleague that they have heard of someone doing this where you can set a default number of times it will allow this to logon and counts down. So my view is that if i can somehow set it to 1 then, it will logon but, not allow it again, until my scheduled script runs again. Are you following me? Any help would be great as i can find nothing on this so far.