8.Tap or click OK. Repeat steps 5–7 for other groups you want to configure.
9.When you’re done creating group entries, tap or click the Settings tab, configure the following additional options, and then tap or click OK to complete the process:
■ Grant The User Exclusive Rights ToGives users full rights to access their data in the special folder.
■ Move The Contents Of FolderName To The New LocationMoves the data in the special folders from the individual systems on the network to the central folder or folders.
■ Also Apply Redirection Policy ToApplies the redirection policy to early releases of Windows as well.
Sometimes you might want to remove redirection from a particular special folder. You remove redirection by following these steps:
1.In the GPMC, press and hold or right-click the GPO for the site, domain, or organizational unit with which you want to work, and then tap or click Edit to open the policy editor for the GPO.
2.In the policy editor, expand the following nodes: User Configuration, Policies, Windows Settings, and Folder Redirection.
3.Under Folder Redirection, press and hold or right-click the special folder with which you want to work, and then tap or click Properties.
4.Tap or click the Settings tab, and then make sure that an appropriate Policy Removal option is selected. The following two options are available:
■ Leave The Folder In The New Location When Policy Is RemovedWhen you select this option, the folder and its contents remain at the redirected location and current users are still permitted to access the folder and its contents at this location.
■ Redirect The Folder Back To The Local Userprofile Location When Policy Is RemovedWhen you select this option, the folder and its contents are copied back to the original location; however, the contents aren’t deleted from the previous location.
5.If you changed the Policy Removal option, tap or click Apply, and then tap or click the Target tab. Otherwise, just tap or click the Target tab.
6.To remove all redirection definitions for the special folder, choose Not Configured in the Setting list.
7.To remove redirection for a particular security group, select the security group in the Security Group Membership panel, and then tap or click Remove. Tap or click OK.
User and computer script management
You can configure four types of scripts with Windows Server:
■ Computer StartupExecuted during startup
■ Computer ShutdownExecuted prior to shutdown
■ User LogonExecuted when a user logs on
■ User LogoffExecuted when a user logs off
Windows supports scripts written as command-shell batch scripts ending with the.bat or.cmd extension or scripts that use the Windows Script Host (WSH). WSH is a feature of Windows Server that enables you to use scripts written in a scripting language, such as VBScript, without needing to insert the script into a webpage. To provide a multipurpose scripting environment, WSH relies on scripting engines. A scripting engine is the component that defines the core syntax and structure of a particular scripting language. Windows Server ships with scripting engines for VBScript and JScript. Other scripting engines are also available.
Beginning with Windows 7 and Windows Server 2008 R2, current Windows operating systems also support Windows PowerShell scripts. When Windows PowerShell is installed on computers that process a particular GPO, you can use Windows PowerShell scripts in much the same way as you use other scripts. You have the option of running Windows PowerShell scripts before or after other types of scripts.
Assigning computer startup and shutdown scripts
Computer startup and shutdown scripts are assigned as part of a GPO; as a result, all computers that are members of the site, domain, or organizational unit-or all three-execute scripts automatically when they’re started or shut down.
To assign a computer startup or shutdown script, follow these steps:
1.In File Explorer, open the folder containing the script or scripts you want to use.
2.In the GPMC, press and hold or right-click the GPO for the site, domain, or organizational unit with which you want to work, and then tap or click Edit to open the policy editor for the GPO.
3.In the Computer Configuration\Policies node, double-tap or double-click the Windows Settings folder, and then tap or click Scripts.
4.To work with startup scripts, press and hold or right-click Startup, and then tap or click Properties. To work with shutdown scripts, press and hold or right-click Shutdown and select Properties to open a dialog box similar to the one shown in Figure 6–3.

FIGURE 6–3Add, edit, and remove computer startup scripts by using the Startup Properties dialog box.
5.On the Scripts tab, you can manage command-shell batch scripts ending with the.bat or.cmd extension and scripts that use the Windows Script Host. On the PowerShell Scripts tab, you can manage Windows PowerShell scripts. When working with either tab, tap or click Show Files.
6.Copy the files in the open File Explorer window, and then paste them into
the window that opened when you clicked Show Files.
7.Tap or click Add to open the Add A Script dialog box and assign a script. In the Script Name text box, enter the name of the script you copied to the Machine\Scripts\Startup or the Machine\Scripts\Shutdown folder for the related policy. In the Script Parameters text box, enter any parameters to pass to the script. Repeat this step to add other scripts.
8.During startup or shutdown, scripts are executed in the order in which they’re listed in the Properties dialog box. On the Scripts tab, use the Up and Down buttons to reorder scripts as necessary. Do the same on the PowerShell Scripts tab. On the PowerShell Scripts tab, you can also use the selection list to specify whether Windows PowerShell scripts should run before or after other types of scripts.
9.If you want to edit the script name or parameters later, select the script in the Script For list, and then tap or click Edit. To delete a script, select the script in the Script For list, and tap or click Remove.
10.To save your changes, tap or click OK.
Assigning user logon and logoff scripts
You can assign user scripts in one of the three following ways:
You can assign logon and logoff scripts as part of a GPO; and as a result, all users who are members of the site, domain, or organizational unit-or all three-execute scripts automatically when they log on or log off.
You can also assign logon scripts individually through the Active Directory Users And Computers console, which enables you to assign a separate logon script to each user or group.
You can also assign individual logon scripts as scheduled tasks by using the Scheduled Task Wizard.
To assign a logon or logoff script in a GPO, follow these steps:
Читать дальше