A logon script is a batch file that’s run automatically whenever a user logs on. The most common reason for using a logon script is to map the network shares that the user needs access to. For example, here’s a simple logon script that maps three network shares:
echo off
net use m: \\server1\shares\admin
net use n: \\server1\shares\mktg
net use o: \\server2\archives
Here, two shares on server1 are mapped to drives M and N, and a share on server2 is mapped as drive O.
If you want, you can use the special variable %username% to get the user’s username. This is useful if you’ve created a folder for each user and you want to map a drive to each user’s folder. For example:
net use u: \\server1\users\%username%
For example, if a user logs on with the username dlowe, drive U is mapped to \\server1\users\dlowe.
Scripts should be saved in the Scripts folder, which is buried deep in the bowels of the SYSVOL folder — typically, c:\Windows\SYSVOL\Sysvol\domainname\Scripts, where domainname is your domain name. Because you frequently need to access this folder, you should create a shortcut to it on your desktop.
After you’ve created a logon script, you can assign it to a user by using the Profile tab of the User Properties dialog box.
dummies
Source:http://www.dummies.com/how-to/content/network-administration-windows-server-2008-logon-s.html
No comments:
Post a Comment