We have a problem where system administrators are logging into the wrong servers and then doing the wrong actions because of fat finger syndrome. So as to make sure that they are logged into the rigth machine, my manager has asked that users get a message that confirms what their computer is named and that this is then presented to the user on logon, with a question asking if they need to log off. Yes. I know.
Anyway, I have a simple task called, "Confirm Computer Name" that contains a line such as:
result = MsgBox("Logged On User: %LOGONUSER%. This computer is %COMPNAME%. Are you sure that you are here correctly?", vbYesNo, vbNo)
And then it does other things, etc.
This task works happily when run as a Task and the tokens are filled in as your would expect:
Logged On User: Jim_Spriggs. This computer is DCS001. Are you sure that you are here correctly?
However, when I run it as a task that is wrapped in a policy, I get the message box appearing with the tokens, such as:
Logged On User: %LOGONUSER%. This computer is %COMPNAME%. Are you sure that you are here correctly?
Why is this not working properly?
Thanks in advance,
QuietLeni