Lab_Module_9
Lab_Module_9
2008 Administration
Module 9
Contents:
i. Lab A: Using the Server Manager Cmdlets
a) Exercise 1: Listing All Currently Installed Features
b) Exercise 2: Comparing Objects
c) Exercise 3: Installing a New Server Feature
d) Exercise 4: Exporting Current Configuration to XML
Lab Setup
For this lab, you will use the available virtual machine environment. Before you begin the lab,
you must:
1. Start the AD virtual machine and then log on by using the following credentials:
• Username: NEWHORIZON\administrator
• Password: Passw0rd
2. On AD, open a Windows PowerShell session as Administrator.
3. On AD, open the Start menu. Under the Administrative Tools folder, open the Group Policy
Management Console.
4. In the left pane of the Group Policy Management Console, expand the forest and domain until
you see the Starter GPO folder. Select the Starter GPO folder by clicking on it.
5. In the right pane, click the Create Starter GPOs button to create the Starter GPOs.
6. Ensure that Windows PowerShell remoting is enabled on AD. If you completed the previous
labs in this course and have not shut down and discarded the changes in the virtual machines,
remoting will be enabled. If not, open a Windows PowerShell session on those two virtual
machines and run Enable-PSRemoting on each.
7. In Windows PowerShell, execute the following two commands:
• Set-ExecutionPolicy RemoteSigned
• Lab_09_Setup.ps1
Note: Some of the Group Policy Objects and DNS entries that this script will modify may
already exist in the virtual machine and you may receive and error saying so if you have used the
virtual machine during earlier modules and have not discarded those changes.
Scenario
You are configuring a new Windows Server 2008 R2 file server. Other administrators have been
using it for testing, so you don’t know what state it is in. You want to use the Server Manager
cmdlets in Windows PowerShell to discover how the server is currently configured.
The main tasks for this exercise are carried out on AD and are as follows:
1. Import the Windows Server Manager PowerShell module.
2. View the module contents.
3. View all installed server features using Windows PowerShell.
Note: The Windows Feature object has a Boolean property called Installed that indicates
whether it is installed or not.
Results: After this exercise, you should have successfully loaded the ServerManager PowerShell
module, displayed the module contents, and viewed installed and available server features.
Scenario
You need to compare the current configuration against your corporate standard. The standard
configuration has been documented using the Export-Clixml cmdlet. You must compare the
feature configuration information in this file against the current configuration.
The main tasks for this exercise are carried out on AD and as follows:
1. Import an XML file with standard configuration information.
2. Compare the standard configuration to the current configuration using the Compare-Object
cmdlet.
Note: The installed property should be the only thing that is different, but you can include other
property names to make the result more meaningful.
Results: After this exercise, you should be able to identify which server features need to be
installed and which need to be removed to bring the configuration into compliance.
Scenario
To bring the server configuration into compliance, you need to install the missing server features.
The main task for this exercise is carried out on AD and is as follows:
1. Install the missing Windows Server features.
Note: Remember, you can use the –WhatIf common parameter with Add-WindowsFeature so
you can preview what the cmdlet would do without actually making any changes.
Results: After this exercise, you should have installed the server features that were installed in
the imported configuration but not in the current configuration.
Scenario
To provide an audit trail, you must export the current configuration to an XML file.
The main tasks for this exercise are carried out on AD and are as follows:
1. Verify the current configuration of installed features.
2. Create an XML file with information about the current feature configuration.
Results: After this exercise, you should have created an XML file that contains the current and
now standardized, feature configuration.
Lab B: Using the Group Policy Cmdlets
Estimated time: 20 minutes
You are a Windows administrator responsible for managing Group Policy objects in your
domain. Your manager has asked for a report of all your Group Policy Objects. You manager
also wants to make sure that all Group Policy Objects are being backed up.
Lab B: Exercise 1: Listing All Group Policy Objects in the Domain Scenario
Your manager has asked for a report of all your Group Policy Objects. You will start this process
by gathering a list of all the Group Policy Objects in the domain.
The main tasks for this exercise are carried out on AD and are as follows:
1. Import the Group Policy PowerShell module.
2. View the module contents.
3. View all Group Policy objects using Windows PowerShell.
Results: After this exercise, you should have successfully loaded the GroupPolicy PowerShell
module, displayed the module contents, and viewed all Group Policy objects in the domain.
Exercise 2: Creating a Text-Based Report
Scenario
Your manager has asked for some brief, summary reports of the Group Policy objects in your
domain in a text file format.
The main tasks for this exercise are as follows:
1. Get selected information from all Group Policy objects in the domain.
2. Create a text file with this information.
Note: Group Policy objects in PowerShell are like any other object in that they have properties.
Use Get-Member to discover property names.
Results: After this exercise, you should have a text file that displays selected properties about all
Group Policy objects in your domain.
Lab B: Exercise 3: Creating HTML Reports
Scenario
You need to document Group Policy objects for historical and audit purposes. Your manager has
also asked for a HTML-formatted report on the default domain policy.
Hint: You need to retrieve the GPOs, and then enumerate them by using ForEach- Object. Within the
ForEach-Object script block, use a GPO cmdlet that generates a GPO report. That cmdlet identifies the
GPOs by using an -id parameter; using $_.id for that parameter value will identify each GPO that you
enumerate.
Results: After this exercise, you should have html reports for every Group Policy object in the
domain.
Lab B: Exercise 4: Backing Up All Group Policy Objects
Scenario
For business continuity purposes it is critical that Group Policy objects are properly backed up
on a weekly basis. Your manager has asked you to develop a PowerShell solution you can run on
a weekly basis to back up all Group Policy objects.
Results: After this exercise, you should have backups of every Group Policy object in the
domain.
Lab C: Using the Troubleshooting Pack Cmdlets
Estimated time: 20 minutes
You work as a systems technician, troubleshooting problems with individual desktops. The help
desk manager has asked for your assistance in troubleshooting a desktop problem. She has heard
you can solve problems with Windows PowerShell and has asked for your assistance in learning
more.
Lab Setup
For this lab, you will use the available virtual machine environment. Before you begin the lab,
you must:
1. Start the AD virtual machine. You do not need to log on, but wait until the boot process is
complete.
2. Start the WINDOWS7 virtual machine, and then logon by using the following credentials:
• Username: NEWHORIZON\administrator
• Password: Passw0rd
3. Open a Windows PowerShell session on WINDOWS7.
Lab C: Exercise 1: Importing the Troubleshooting Pack Module
Scenario
Your company has standardized on Windows 7 as the client operating system which includes
PowerShell. You need to become familiar with PowerShell-based tools that you can use to
troubleshoot and resolve problems.
The main tasks for this exercise are carried out on WINDOWS7 and are as follows:
1. Import the Troubleshooting Pack PowerShell module.
2. View the module contents.
Results: After this exercise, you will have successfully loaded the Troubleshooting Pack module
and know what cmdlets it offers.
Lab C: Exercise 2: Solving an End-User Problem Interactively
Scenario
Since you have to support Windows 7 clients, you plan to use Windows PowerShell to resolve
problems faster and more efficiently. There is an ongoing problem with the Windows Search
service. Using the Troubleshooting Pack cmdlets, your job is to find a way to identify this
problem and resolve it.
The main tasks for this exercise are:
1. Stop Windows search.
2. Run an interactive troubleshooting session.
3. View the report.
Results: After this exercise, you should have successfully run an interactive troubleshooting
session in Windows PowerShell and generated a report file.
Lab C: Exercise 3: Solving a Problem Using Answer Files
Scenario
You have a recurring problem that is relatively easy to resolve once it has been identified. You
want to develop an answer file for this problem so that if the suspected problem exists, you can
run the file so, the problem can be resolved quickly with minimal intervention on your part.
The main tasks for this exercise are as follows:
1. Create a troubleshooting pack answer file.
2. Use the answer file to resolve a problem.
3. Run a troubleshooting session unattended.
Lab Setup
For this lab, you will use the available virtual machine environment. Before you begin the lab,
you must:
1. Start the AD virtual machine, and then log on by using the following credentials:
• Username: NEWHORIZON\administrator
• Password: Passw0rd
2. Open a Windows PowerShell session.
Lab D: Exercise 1: Importing the Best Practices Module
Scenario
As a Windows administrator, it is very important that your systems operate at peak efficiency
while remaining secure. As a company policy you closely follow Microsoft recommended best
practices. Windows PowerShell has a solution for analyzing your computers and network to see
if they meet their recommended best practices. You want to learn more about this.
Results: After this exercise, you should have successfully loaded the Best Practices PowerShell
module and displayed the module contents.
Lab D: Exercise 2: Viewing Existing Models
Scenario
In continuing your investigation of how PowerShell can help with analyzing best practices, you
need to discover what areas it can scan.
Results: After this exercise, you should be able to identify which areas can be scanned for best
practices.
Lab D: Exercise 3: Running a Best Practices Scan
Scenario
Now that you know what areas you can scan, you decide to discover how well your systems
match up to the best practice model.
Lab Setup
For this lab, you will use the available virtual machine environment. Before you begin the lab,
you must:
1. Start the AD virtual machine, and then log on by using the following credentials:
• Username: NEWHORIZON\administrator
• Password: Passw0rd
2. Open a Windows PowerShell session.
Lab E: Exercise 1: Importing the IIS Module
Scenario
Your job includes creating and managing Web sites. Because your company charges back for IT
services, you need to automate Web site management so that it can be done in the most efficient
manner possible. You have heard that you can manage IIS from Windows PowerShell and want
to learn more.
Results: After this exercise, you should have successfully loaded the IIS PowerShell module and
displayed the module contents.
Lab E: Exercise 2: Creating a New Web Site
Scenario
You want to test the IIS cmdlets by creating a simple Web site. The main tasks for this exercise
are as follows:
1. Create a simple Web site using the IIS cmdlets.
2. View all web sites.
3. Verify the Web site.
Results: After this exercise, you should be able to open the new Web site in Internet explorer
and view the default document.
Lab E: Exercise 3: Backing Up IIS
Scenario
Before making changes to IIS or Web site configurations, you need to have a backup. You want
to use the IIS cmdlets to back up your IIS configuration.
Results: After this exercise, you should have a verified backup of IIS. Lab Instructions: \
Lab E: Exercise 4: Modifying Web Site Bindings
Scenario
To provide additional security for your internal Web server, you want to change the binding from
the default port to a new port.
Results: After this exercise, you should have changed the default binding on all sites to 8001 and
verified the change.
Lab E: Exercise 5: Using the IIS PSDrive
Scenario
Because your Web server includes several sites, you do not want the default site to start
automatically. Using the IIS PSDrive, you need to reconfigure the site so that it does not start
automatically.
Scenario
You realize you don’t want to keep the changes you’ve made so you wish to restore IIS to its
previous configuration.
The main tasks for this exercise are:
1. View all available IIS configuration backups.
2. Restore the most current IIS backup.
Results: After this exercise, you should have restored IIS back to an earlier configuration with
all sites back on port 80. You can ignore any errors about denied access to
c:\windows\system32\inetserv\config\scheman\wsmanconfig_schema.xml.