MIT 403留学生讲解、辅导Group Policy Settings、辅导C++编程、讲解Java/Python语言
- 首页 >> 其他 St Clair College of Applied Arts & Technology
MIT 403– Network Administration I
Group Policy Settings
Revision Date: 2017-12-01
Lab 7
In this project you will:
Deploy Software to computers and users then create a shutdown script. You will also use Group Policies to create a folder redirection policy and use filter options to find a policy.
Step 1 – Deploying Software to a computer – On Server
Objective: Create a software installation policy and deploy a software package to a computer.
1.Log on to Sever and Windows 10 as Administrator
2.On server, open File Explorer, and create a folder called SoftDeploy on the C volume.
3.Right-click SoftDeploy, point to Share with, and click Specific people. In the File Sharing dialog box, type Authenticated Users in the text box at the top, and then click Add. Leave the default permission Read and the entries Administrator and Administrators in the permissions list. Click Share, and then click Done.
4.In File Explorer, double-click the SoftDeploy folder, and create a subfolder named GPMCScripts. (GPMC Sample Scripts is the name of the utility you’re deploying.) Close File Explorer.
5.On your host computer, click start then in the search box type \\80dell\mit403 , copy and paste the GPMCSampleScripts file to your GPMcScripts folder on your server.
6.Right-click Start and click Run. Type \\SXXXXXXX\SoftDeploy\GPMCScripts in the Open text box, and click OK.
7.On Server in Server Manager->Tools->Group Policy Management console, click the Group Policy Objects folder, and create a GPO in it named SwInst by Right-Clicking the Group Policy Object and selecting New then typing SwInst in the name box and then click OK. Right-click SwInst and click Edit. In the Group Policy Management Editor, expand Computer Configuration, Policies, Software Settings, and Software installation.
8.Right-click empty space in the right pane, point to New, and click Package. In the Open dialog box, type \\SXXXXXXX\SoftDeploy\GPMCScripts, and press Enter. Click the GPMCSampleScripts file, and then click Open.
9. In the Deploy Software dialog box, leave the default option Assigned. Notice that the
Published option is grayed out because you can publish a software package only in the User Configuration node. Click OK. The Advanced option enables you to set additional options for package deployment, but for now, stick with the default deployment options.
10.You see the Microsoft GPMC Sample Scripts file in the right pane (see Figure below). Right-click
Microsoft GPMC Sample Scripts and click Properties. Click each tab to get an idea of the available options for deploying a software package. Click Cancel to close the Properties dialog box, and close the Group Policy Management Editor.
11.In the Group Policy Management console, link the SwInst GPO to the Advertising OU by right-clicking the Advertising OU and selecting Link an Existing GPO.
12.For more reliable processing of software installation policies, you should configure another group policy setting. Right-click DEFAULT DOMAIN POLICY, which is linked to the domain, and click Edit to open it in the Group Policy Management Editor. Expand Computer Configuration, Policies, Administrative Templates, System, and Group Policy. In the right pane, double-click Configure software Installation policy processing. Click Enabled, and then click Allow processing across a slow network connection and Process even if the Group Policy objects have not changed. Click OK, and close the Group Policy Management Editor.
13.Microsoft GPMC Sample Scripts isn’t actually an executable program; it’s a collection of scripts that can be used with the Group Policy Management console. Open File Explorer, and navigate to C:\Program Files\Microsoft Group Policy. Double-click the GPMC Sample Scripts folder to see a bevy of scripts for managing Group Policy.
Step 2 – Deploying software to Users – On Server and Windows 10
Objective: You want to deploy a software package to certain users regardless of which computer they use to log on.
1.Log on to Server as Administrator, if necessary.
2.On Server, open the Group Policy Management console, if necessary.
3.Open the SwInst GPO in the Group Policy Management Editor by right-clicking and selecting Edit. First, you delete the current software package in the Software installation node. Navigate to the Software installation node under the Computer Configuration node, right-click Microsoft GPMC Sample Scripts, point to All Tasks, and click Remove. You have the option of uninstalling the software from users and computers immediately or allowing users to continue using software already installed. Accept the default setting Immediately uninstall the software from users and computers, and click OK.
4.Navigate to User Configuration, Policies, Software Settings, and Software installation.
5.Right-click in the right pane, point to New, and click Package. In the Open dialog box, type
\\SXXXXXXX\SoftDeploy\GPMCScripts and press Enter. Click the GPMCSampleScripts file, and then click Open.
6.In the Deploy Software dialog box, click the Advanced option button, and then click OK to open the Microsoft GPMC Sample Scripts Properties dialog box. Click the Deployment tab. Leave the Deployment type set at Published, and click to select Uninstall this application when it falls out of the scope of management. Change the Installation user interface options to the Basic setting, and click OK. Close the Group Policy Management Editor.
7.Link the SwInst GPO to the Managers OU by right-clicking the OU and selecting Link an Existing GPO.
8.On Windows 10, log on as one of the accounts in the Managers OU. Right-click Start and click Programs and Features. Click the Install a program from the network link in the left pane. You should see a link to Microsoft GPMC Sample Scripts. If this were an executable program associated with a file type, it would install automatically if you tried to open a file of the specified type.
9.Next, you set the software installation policy to install automatically when the user logs on. On Server, open SwInst in the Group Policy Management Editor. Navigate to User Configuration, Policies, Software Settings, and b. In the right pane, right-click the package and click Properties. Click the Deployment tab.
10.Click the Assigned option button and click to select Install this application at logon. Click OK. Close the Group Policy Management Editor.
11.Log off Windows 10 and log back on with the same account. Right-click Start and click Programs and Features. You see that Microsoft GPMC Sample Scripts is now installed. Log off Windows 10.
12.On Server, unlink SwInst from the Managers OU.
Step 3: Deploying a Logoff Script to a Computer – On Server and Windows 10
Objective: Create and deploy a shutdown script.
1.Log on to Server as Administrator, if necessary.
2.Start Notepad and type del /F /S c:\*.temp. The /F option forces deletion of read-only files, and the /S option deletes the file in the current directory and all subdirectories.
3.Click File, Save As from the menu. Choose the desktop as the location for saving your file. In the Save as type list box, click All Files (*.*). Type deltemp.bat in the File name text box, and click Save. Exit Notepad.
4.Right-click deltemp.bat on your desktop and click Copy and paste the script into C:\WINDOWS\SYSVOL\sysvol\DOMAINNAME\scripts.
5.Open the Group Policy Management console. Click the Group Policy Objects folder and create a GPO named Scripts.
6.Right-click Scripts and click Edit. In the Group Policy Management Editor, click to expand User Configuration, Policies, and Windows Settings, and then click Scripts. Right-click Logoff in the right pane and click Properties. In the Logoff Properties dialog box, click Show Files. In the File Explorer window that opens, right-click the right pane and click Paste. Note the path where the script is stored—a folder in the SYSVOL share on your DC. Close the File Explorer window.
7.In the Logoff Properties dialog box, click Add. In the Add a Script dialog box, click Browse. Click deltemp, and then click Open. Click OK twice.
8.Close the Group Policy Management Editor. Link Scripts to the Managers OU by right-clicking the Manager OU then selecting Link in the list displayed select Scripts.
9. Log on to Windows 10 as one of the users in the Managers OU. You’re going to create a few files on your desktop that have the .temp extension. Open a command prompt window, and then type cd desktop and press Enter. Type copy nul > file1.temp and press Enter to create an empty file. Repeat the command two more times, changing file1 to file2 and then file3. You see the files on your desktop.
10.Type gpupdate and press Enter. After gpupdate is finished, Logoff your computer. (If you don’t run gpupdate, you have to restart the computer to load the policy, and then shut it down again to make the shutdown script run.) The Logoff process will probably take a little longer than usual because the script has to run.
11.Log on to Windows 10 as the same user again, and verify that the .temp files have been deleted.
Log off Windows 10.
12.On Server, unlink Scripts from the Managers OU. Stay logged on to Server if you’re continuing to the next activity.
Step 4 – Configuring a Folder Redirection Policy – On Server and Workstation 10
1.Log on to Server as Administrator, if necessary.
2.Open File Explorer, and create a folder named Redirected in the C volume. Share the folder, giving the Everyone group Read/Write sharing permission, and leave the remaining permissions at their default settings.
3.Open the Group Policy Management console, and create a GPO named FolderRedir in the Group Policy Objects folder. Open FolderRedir in the Group Policy Management Editor. Expand User Configuration, Policies, Windows Settings, and Folder Redirection. Right-click the Documents folder and click Properties.
4.In the Documents Properties dialog box, click Basic - Redirect everyone’s folder to the same location in the Setting drop-down list. Click the Target folder location list arrow to view the available options, and then, if necessary, click Create a folder for each user under the root path in the list. In the Root Path text box, type \\SXXXXXXX\Redirected.
5.Click the Settings tab, and review the available options. Click to clear the Grant the user exclusive rights to Documents check box. Click Redirect the folder back to the local user profile location when policy is removed, click OK, and in the warning message box, click Yes. Close the Group Policy Management Editor.
6.In the Group Policy Management console, link the FolderRedir GPO to Managers OU.
7.On Windows 10, log on as one of the users in the Managers OU, and run gpupdate. Then restart Windows 10, and log on again with the same user.
8.On Windows 10, open File Explorer. Create a text file in the Documents folder named TestRedirect.
9.Right-click Start, click Run, type \\Server\redirected, and press Enter. You should see a folder named after the user in the share. Double-click the folder, and double-click the Documents folder. The TestRedirect file you created in the Documents folder should be there. Log off Windows 10.
10.On Server, unlink the FolderRedir GPO from Managers OU. Stay logged on to Server.
Step 5 – Policy Settings with Filter Options – On Server
1.Log on to Server as Administrator, and open the Group Policy Management console.
2.Open the Managers Policy in the Group Policy Management Editor.
3.Under User Configuration, click to expand Policies, and click Windows Settings. Notice that there’s no Filter icon on the toolbar because you can’t filter settings in Windows Settings. Click Administrative Templates. You should see the Filter icon now.
4.Click Action from the menu, Filter Options. In the Filter Options window, click Any, if necessary, in the Managed, Configured, and Commented list boxes.
5.Click the Enable Keyword Filters check box. You remember that the policy setting title has the word “desktop” in it, so type desktop in the Filter for words(s) text box. If necessary, click Any in the list box next to the Filter for word(s) text box.
6.Click Policy Setting Title, and if necessary, click to clear the Help Text and Comment check boxes. Click OK. You see a filter icon on the Administrative Templates folder.
7.Under User Configuration, click to expand Administrative Templates, and click All Settings. You see a list of policy settings with the word “desktop” in the title. That’s still quite a few settings to sift through.
8.Click Action, Filter Options. You remember that the word “start” was also in the title. In the
Filter for word(s) text box, type the word start next to “desktop,” making sure to leave a space between them. In the list box, click All so that the filter shows only policy settings with both words in them. Click OK.
9.Now you see only one policy setting, and it’s the one you are looking for. Leave this window open for evaluation.
Make sure I check your work and your mark sheet is completed and handed in.
St Clair College of Applied Arts & Technology
MIT 403 – Network Administration I
Group Policy Settings
Lab 7 Completion Form
Name: ______________________________ Student #: _____________________
Mark out of 10 _________________ Instructor Initials: ___________________
Date of Completion: December_________ 2017
MIT 403– Network Administration I
Group Policy Settings
Revision Date: 2017-12-01
Lab 7
In this project you will:
Deploy Software to computers and users then create a shutdown script. You will also use Group Policies to create a folder redirection policy and use filter options to find a policy.
Step 1 – Deploying Software to a computer – On Server
Objective: Create a software installation policy and deploy a software package to a computer.
1.Log on to Sever and Windows 10 as Administrator
2.On server, open File Explorer, and create a folder called SoftDeploy on the C volume.
3.Right-click SoftDeploy, point to Share with, and click Specific people. In the File Sharing dialog box, type Authenticated Users in the text box at the top, and then click Add. Leave the default permission Read and the entries Administrator and Administrators in the permissions list. Click Share, and then click Done.
4.In File Explorer, double-click the SoftDeploy folder, and create a subfolder named GPMCScripts. (GPMC Sample Scripts is the name of the utility you’re deploying.) Close File Explorer.
5.On your host computer, click start then in the search box type \\80dell\mit403 , copy and paste the GPMCSampleScripts file to your GPMcScripts folder on your server.
6.Right-click Start and click Run. Type \\SXXXXXXX\SoftDeploy\GPMCScripts in the Open text box, and click OK.
7.On Server in Server Manager->Tools->Group Policy Management console, click the Group Policy Objects folder, and create a GPO in it named SwInst by Right-Clicking the Group Policy Object and selecting New then typing SwInst in the name box and then click OK. Right-click SwInst and click Edit. In the Group Policy Management Editor, expand Computer Configuration, Policies, Software Settings, and Software installation.
8.Right-click empty space in the right pane, point to New, and click Package. In the Open dialog box, type \\SXXXXXXX\SoftDeploy\GPMCScripts, and press Enter. Click the GPMCSampleScripts file, and then click Open.
9. In the Deploy Software dialog box, leave the default option Assigned. Notice that the
Published option is grayed out because you can publish a software package only in the User Configuration node. Click OK. The Advanced option enables you to set additional options for package deployment, but for now, stick with the default deployment options.
10.You see the Microsoft GPMC Sample Scripts file in the right pane (see Figure below). Right-click
Microsoft GPMC Sample Scripts and click Properties. Click each tab to get an idea of the available options for deploying a software package. Click Cancel to close the Properties dialog box, and close the Group Policy Management Editor.
11.In the Group Policy Management console, link the SwInst GPO to the Advertising OU by right-clicking the Advertising OU and selecting Link an Existing GPO.
12.For more reliable processing of software installation policies, you should configure another group policy setting. Right-click DEFAULT DOMAIN POLICY, which is linked to the domain, and click Edit to open it in the Group Policy Management Editor. Expand Computer Configuration, Policies, Administrative Templates, System, and Group Policy. In the right pane, double-click Configure software Installation policy processing. Click Enabled, and then click Allow processing across a slow network connection and Process even if the Group Policy objects have not changed. Click OK, and close the Group Policy Management Editor.
13.Microsoft GPMC Sample Scripts isn’t actually an executable program; it’s a collection of scripts that can be used with the Group Policy Management console. Open File Explorer, and navigate to C:\Program Files\Microsoft Group Policy. Double-click the GPMC Sample Scripts folder to see a bevy of scripts for managing Group Policy.
Step 2 – Deploying software to Users – On Server and Windows 10
Objective: You want to deploy a software package to certain users regardless of which computer they use to log on.
1.Log on to Server as Administrator, if necessary.
2.On Server, open the Group Policy Management console, if necessary.
3.Open the SwInst GPO in the Group Policy Management Editor by right-clicking and selecting Edit. First, you delete the current software package in the Software installation node. Navigate to the Software installation node under the Computer Configuration node, right-click Microsoft GPMC Sample Scripts, point to All Tasks, and click Remove. You have the option of uninstalling the software from users and computers immediately or allowing users to continue using software already installed. Accept the default setting Immediately uninstall the software from users and computers, and click OK.
4.Navigate to User Configuration, Policies, Software Settings, and Software installation.
5.Right-click in the right pane, point to New, and click Package. In the Open dialog box, type
\\SXXXXXXX\SoftDeploy\GPMCScripts and press Enter. Click the GPMCSampleScripts file, and then click Open.
6.In the Deploy Software dialog box, click the Advanced option button, and then click OK to open the Microsoft GPMC Sample Scripts Properties dialog box. Click the Deployment tab. Leave the Deployment type set at Published, and click to select Uninstall this application when it falls out of the scope of management. Change the Installation user interface options to the Basic setting, and click OK. Close the Group Policy Management Editor.
7.Link the SwInst GPO to the Managers OU by right-clicking the OU and selecting Link an Existing GPO.
8.On Windows 10, log on as one of the accounts in the Managers OU. Right-click Start and click Programs and Features. Click the Install a program from the network link in the left pane. You should see a link to Microsoft GPMC Sample Scripts. If this were an executable program associated with a file type, it would install automatically if you tried to open a file of the specified type.
9.Next, you set the software installation policy to install automatically when the user logs on. On Server, open SwInst in the Group Policy Management Editor. Navigate to User Configuration, Policies, Software Settings, and b. In the right pane, right-click the package and click Properties. Click the Deployment tab.
10.Click the Assigned option button and click to select Install this application at logon. Click OK. Close the Group Policy Management Editor.
11.Log off Windows 10 and log back on with the same account. Right-click Start and click Programs and Features. You see that Microsoft GPMC Sample Scripts is now installed. Log off Windows 10.
12.On Server, unlink SwInst from the Managers OU.
Step 3: Deploying a Logoff Script to a Computer – On Server and Windows 10
Objective: Create and deploy a shutdown script.
1.Log on to Server as Administrator, if necessary.
2.Start Notepad and type del /F /S c:\*.temp. The /F option forces deletion of read-only files, and the /S option deletes the file in the current directory and all subdirectories.
3.Click File, Save As from the menu. Choose the desktop as the location for saving your file. In the Save as type list box, click All Files (*.*). Type deltemp.bat in the File name text box, and click Save. Exit Notepad.
4.Right-click deltemp.bat on your desktop and click Copy and paste the script into C:\WINDOWS\SYSVOL\sysvol\DOMAINNAME\scripts.
5.Open the Group Policy Management console. Click the Group Policy Objects folder and create a GPO named Scripts.
6.Right-click Scripts and click Edit. In the Group Policy Management Editor, click to expand User Configuration, Policies, and Windows Settings, and then click Scripts. Right-click Logoff in the right pane and click Properties. In the Logoff Properties dialog box, click Show Files. In the File Explorer window that opens, right-click the right pane and click Paste. Note the path where the script is stored—a folder in the SYSVOL share on your DC. Close the File Explorer window.
7.In the Logoff Properties dialog box, click Add. In the Add a Script dialog box, click Browse. Click deltemp, and then click Open. Click OK twice.
8.Close the Group Policy Management Editor. Link Scripts to the Managers OU by right-clicking the Manager OU then selecting Link in the list displayed select Scripts.
9. Log on to Windows 10 as one of the users in the Managers OU. You’re going to create a few files on your desktop that have the .temp extension. Open a command prompt window, and then type cd desktop and press Enter. Type copy nul > file1.temp and press Enter to create an empty file. Repeat the command two more times, changing file1 to file2 and then file3. You see the files on your desktop.
10.Type gpupdate and press Enter. After gpupdate is finished, Logoff your computer. (If you don’t run gpupdate, you have to restart the computer to load the policy, and then shut it down again to make the shutdown script run.) The Logoff process will probably take a little longer than usual because the script has to run.
11.Log on to Windows 10 as the same user again, and verify that the .temp files have been deleted.
Log off Windows 10.
12.On Server, unlink Scripts from the Managers OU. Stay logged on to Server if you’re continuing to the next activity.
Step 4 – Configuring a Folder Redirection Policy – On Server and Workstation 10
1.Log on to Server as Administrator, if necessary.
2.Open File Explorer, and create a folder named Redirected in the C volume. Share the folder, giving the Everyone group Read/Write sharing permission, and leave the remaining permissions at their default settings.
3.Open the Group Policy Management console, and create a GPO named FolderRedir in the Group Policy Objects folder. Open FolderRedir in the Group Policy Management Editor. Expand User Configuration, Policies, Windows Settings, and Folder Redirection. Right-click the Documents folder and click Properties.
4.In the Documents Properties dialog box, click Basic - Redirect everyone’s folder to the same location in the Setting drop-down list. Click the Target folder location list arrow to view the available options, and then, if necessary, click Create a folder for each user under the root path in the list. In the Root Path text box, type \\SXXXXXXX\Redirected.
5.Click the Settings tab, and review the available options. Click to clear the Grant the user exclusive rights to Documents check box. Click Redirect the folder back to the local user profile location when policy is removed, click OK, and in the warning message box, click Yes. Close the Group Policy Management Editor.
6.In the Group Policy Management console, link the FolderRedir GPO to Managers OU.
7.On Windows 10, log on as one of the users in the Managers OU, and run gpupdate. Then restart Windows 10, and log on again with the same user.
8.On Windows 10, open File Explorer. Create a text file in the Documents folder named TestRedirect.
9.Right-click Start, click Run, type \\Server\redirected, and press Enter. You should see a folder named after the user in the share. Double-click the folder, and double-click the Documents folder. The TestRedirect file you created in the Documents folder should be there. Log off Windows 10.
10.On Server, unlink the FolderRedir GPO from Managers OU. Stay logged on to Server.
Step 5 – Policy Settings with Filter Options – On Server
1.Log on to Server as Administrator, and open the Group Policy Management console.
2.Open the Managers Policy in the Group Policy Management Editor.
3.Under User Configuration, click to expand Policies, and click Windows Settings. Notice that there’s no Filter icon on the toolbar because you can’t filter settings in Windows Settings. Click Administrative Templates. You should see the Filter icon now.
4.Click Action from the menu, Filter Options. In the Filter Options window, click Any, if necessary, in the Managed, Configured, and Commented list boxes.
5.Click the Enable Keyword Filters check box. You remember that the policy setting title has the word “desktop” in it, so type desktop in the Filter for words(s) text box. If necessary, click Any in the list box next to the Filter for word(s) text box.
6.Click Policy Setting Title, and if necessary, click to clear the Help Text and Comment check boxes. Click OK. You see a filter icon on the Administrative Templates folder.
7.Under User Configuration, click to expand Administrative Templates, and click All Settings. You see a list of policy settings with the word “desktop” in the title. That’s still quite a few settings to sift through.
8.Click Action, Filter Options. You remember that the word “start” was also in the title. In the
Filter for word(s) text box, type the word start next to “desktop,” making sure to leave a space between them. In the list box, click All so that the filter shows only policy settings with both words in them. Click OK.
9.Now you see only one policy setting, and it’s the one you are looking for. Leave this window open for evaluation.
Make sure I check your work and your mark sheet is completed and handed in.
St Clair College of Applied Arts & Technology
MIT 403 – Network Administration I
Group Policy Settings
Lab 7 Completion Form
Name: ______________________________ Student #: _____________________
Mark out of 10 _________________ Instructor Initials: ___________________
Date of Completion: December_________ 2017