Friday, January 11, 2013

Showing System message to user when logging in

As part of my role at my company, I’m responsible for deploying code to servers as well as troubleshooting issues with environments as they come up. As a result of this, I’m typically logged into multiple servers at a time. As anyone who does this sort of thing knows, it can be very easy to forget which environment you are in and accidentally modify the wrong server at the wrong time. If this happens to be a production server, the consequences can be catastrophic.

Here is a nice little trick I use to make sure that people know which server they are accessing.
Remote desktop into the server and open Windows Task Scheduler: clip_image001
On the right hand side in the Actions pane click "Create task:" clip_image002
When the Create task window opens, on the General Tab enter a name:

Click on the Triggers tab and click the "New..." button
On the New Trigger window, select "At Log on" in the Begin the Task dropdown and make sure "Any User" is selected in the Settings box and click "OK". This will show the message when a user logs in to the server.

Add another trigger and select "On connection to user session". This will show the message when a user reconnects to an existing user session.

Click on the Actions tab and click "New..."
In the Action dropdown, select "Display a message". Then enter a title for your message and the message you want to show to the user:
Click "OK" to close the Create Task window.

Now when the user logs in or reconnects to a session, you'll see the message:

No comments:

Post a Comment