Beruflich Dokumente
Kultur Dokumente
Logon Scripts
Exercise 12 : Logon Scripts
In this exercise you will create logon and logoff scripts and apply these to users in an
organizational unit. You will specify a network home directory for users and arrange for this
directory to be mapped when the user logs on. Finally, you will specify disk space restrictions for
specific users.
EXERCISE 12.1
Logon Scripts
A logon script is a sequence of commands that executes when a user logs onto the network.
2. Launch Group Policy Management. Click Start ► Administrative Tools ► Group Policy
Management (Figure 0389).
Figure 0389 : Launch Group Policy Management
6. Right-click the STKM Group Policy and select Edit (Figure 0393).
7. The group policy editor allows you to specify user and computer settings. In the
following steps, you will change some of these settings (Figure 0394).
Figure 0394 : Group Policy Management Editor
13. In the Logon Properties windows, click Show Files… button (Figure 0400).
Figure 0400 : Logon Properties
Right-click inside the new windows and select New ► Text Document (Figure 0401).
15. Double-click the text document. This will load the Notepad editor. Type the following
text into the file (Figure 0402).
echo off
cls
echo This is a log on script for the Stkm OU
echo Welcome %USERNAME% , member of the Stkm OU
pause
16.1. From Menu bar, click File ► Save As… (Figure 0403).
18. Close the Script windows by clicking the X button at the right top corner of the windows
(Figure 0407).
19. On the Logon Properties window, click Add… button (Figure 0408).
Figure 0408 : Logon Properties – Add…
20. Click Browse… button on the Add a Script window (Figure 0409).
23. Now you can see the Stkm.cmd appear in the “Script Name:” box. Click OK button to
continue (Figure 0412).
24. Stkm.cmd now listed under Logon Properties Script. Click OK button to close the
Logon Properties window (Figure 0413).
Figure 0413 : Logon Properties window
26. On the Group Policy Management window, right-click STKM Group Policy and uncheck
all options except Link Enabled (Figure 0414).
28. In the Group Policy Management Editor, expand User Configuration (Figure 0416).
33. Double-click the Run logon scripts visible option (Figure 0421).
Figure 0421 : Group Policy Management Editor – Run logon scripts visible
34. The Run logon scripts visible Properties appear. Click the Enabled button to enable this
setting (Figure 0422).
36. In the same folder, double-click the Run logon scripts synchronously option (Figure
0423).
Figure 0423 : Group Policy Management Editor – Run logon scripts synchronously
37. The Run logon scripts synchronously Properties appear. Click the Enabled button to
enable this setting (Figure 0424).
Figure 0424: Run logon scripts visible Properties
39. The setting now displays as Enabled in the Group Policy Editor (Figure 0425).
41. On Group Policy Management, click Refresh button and close the Group Policy
Management window.
47. The logon script should appear same as figure below (Figure 0430).
Summary
Scripts allow for both user and computer environments to be configured. The four scripts
available are startup, shutdown, logon and logoff.