Network Administration: Automating Tasks with Logon Scripts
A logon script is a batch file that runs automatically whenever a user logs on. Logon scripts can perform several important logon tasks for you, such as mapping network drives, starting applications, synchronizing the client computer’s time-of-day clock, and so on. Logon scripts reside on the server. Each user account can specify whether to use a logon script and which script to use.
Here’s a sample logon script that maps a few network drives and synchronizes the time:
net use m: \MYSERVERAcct net use n: \MYSERVERAdmin net use o: \MYSERVERDev net time \MYSERVER /set /yes
Logon scripts are a little out of vogue because most of what a logon script does can be done via user profiles. Still, many administrators prefer the simplicity of logon scripts, so they’re still used even on Windows Server 2003 and 2008 systems.