Microsoft Virtual Labs: Managing Windows Server 2008 Using New Management Technologies
Microsoft Virtual Labs: Managing Windows Server 2008 Using New Management Technologies
Table of Contents
Managing Windows Server 2008 Using New Management Technologies ............................... 1
Exercise 1 Using Task Scheduler and Event Viewer to Respond to System Events .....................................................2
Exercise 2 Creating Custom Scheduled Tasks...............................................................................................................6
Exercise 3 Managing Computers Using Windows Remote Management (WinRM) ....................................................9
Managing Windows Server 2008 Using New Management Technologies
Page 1 of 10
Managing Windows Server 2008 Using New Management Technologies
Exercise 1
Using Task Scheduler and Event Viewer to Respond to
System Events
Scenario
In this exercise you will use the new Event Viewer in Windows 2008 Server to monitor and more effectively
respond to system events. You will first create a custom event view to filter system events to only relevant events.
You will then use a WinRM based event subscription to monitor events on a remote system. WinRM based event
subscriptions forward select events from a remote computer to a destination computer. Once you have created the
event subscription, you will create a custom task to provide an interactive notification to an operator. The WinRM
provider is included with Windows 2008 Server. It is configured to start automatically. You only need to configure
the service.
Setting Value
Logged: Last 24 hours
Event level: Error
Event log: Windows Logs/System
e. In the Save Filter to Custom View dialog box, in Name type Error Events (24
hours) and then click OK
f. Review the contents of the Error Events (24 hours) view.
2. Add a Custom Event Note: In this task you will use the EventQuery command to record a custom event in
to the System Log the Event log. This event will meet the criteria of the event view you created in the
and View it in the previous task. You will use your event view to review the custom event in the event
Event View log. When performing configuration tasks via script, such as those used to configure
Windows 2008 Server Core, you can use this command to record success or failure of
script actions.
Note: Perform this task on the NYC-DC-1 computer as
Page 2 of 10
Managing Windows Server 2008 Using New Management Technologies
Tasks Detailed Steps
Woodgrovebank\Administrator.
a. On the Start menu, right-click Command Prompt and then click Run as
administrator.
b. In the command prompt, type the following command and then press ENTER.
Setting Value
Page 3 of 10
Managing Windows Server 2008 Using New Management Technologies
Tasks Detailed Steps
Logged: Last 24 hours
Event level: Error
Event log: Windows Logs/System
Event ID’s: 100
l. In the Subscription Properties dialog box, click Advanced.
m. In Advanced Subscription Settings, select Specific User and then click User and
Password.
n. In Credentials for Subscription Source, in Username type
WOODGROVEBANK\Administrator, in Password type pass@word1, and
then click OK.
o. In the Advanced Subscription Settings dialog box, in Event Delivery
Optimization, click Minimize Latency and then click OK.
p. Click OK to close the Subscription Properties dialog box.
q. In the Event Viewer dialog box, click Yes. Leave Computer Management open,
you will use it again later in this exercise.
Complete the following Note: In this task you will configure WinRM to listen on the external interface of the
task on: NYC-DC-1 computer. WinRM is enabled by default, but not configured to listen on
any external interface on HTTP or HTTPS in Windows 2008 Server. For maximum
security Windows 2008 server should be configured to use HTTPS at all times.
NYC-DC-1
Note: Perform this task on the NYC-DC-1 computer as
4. Enable WinRM for Woodgrovebank\Administrator.
Event Subscriptions
a. On the Start menu, right click Command Prompt and then click Run as
Administrator.
b. In the command prompt, type the following command and then press ENTER.
WINRM QuickConfig
c. In the command prompt, type Y and then press ENTER.
Complete the following 2 Note: In this task you will log a custom event on the NYC-DC-1 computer and review
tasks on: the event using your event subscription on the NYC-SRV-1 computer. The event
subscription may take a few seconds to process the event.
Note: Perform this task on the NYC-SRV-1 computer as
NYC-SRV-1
Woodgrovebank\Administrator.
5. Verify Event
a. In Computer Management, navigate to System Tools/Event Viewer and then
Subscriptions are
select Subscriptions.
Functioning
Correctly b. In the contents pane, click MyApp Errors on NYC-DC-1 and then in the Actions
pane, click Retry.
c. Verify that MyApp Errors on NYC-DC-1 shows a status of Active.
d. On the Start menu, navigate to All Programs/Accessories, right-click Command
Prompt and then click Run as administrator.
e. In the command prompt window, type the following command and then press
ENTER.
Page 4 of 10
Managing Windows Server 2008 Using New Management Technologies
Tasks Detailed Steps
g. In the contents pane, verify that an Error entry exists for MyApp.
6. Create an Alert Task Note: In this task you will create a task based on an event. The new Task Scheduler in
Based On a Windows 2008 Server has been extended to include the ability to launch tasks when
Forwarded Event system events occur. This is a very effective way to automatically respond to system
events. Three types of actions are supported for events which allow you to run an
application or script, display an alert, or sent an email message. This task will create
an alert to notify the currently logged on user that an error has occurred.
Note: Perform this task on the NYC-SRV-1 computer as
Woodgrovebank\Administrator.
a. In Computer Management, navigate to System Tools/Event Viewer/Windows
Logs and then click Forwarded Events.
b. In the Contents pane, click MyApp Error, and then in the Actions pane click
Attach Task To This Event.
c. Complete the Create Basic Task Wizard using the following information.
Setting Value
Name MyApp Error 100 Interactive Notification
Action Display a message
Display a Message: MyApp Error
Title
Display a Message: Error 100 occurred in MyApp on NYC-DC-1
Message
d. In the Event Viewer dialog box, click OK.
e. On the Start menu, navigate to All Programs/Accessories, right-click Command
Prompt and then click Run as administrator.
f. In the command prompt window, type the following command and then press
ENTER.
Page 5 of 10
Managing Windows Server 2008 Using New Management Technologies
Exercise 2
Creating Custom Scheduled Tasks
Scenario
The Task Scheduler in Windows 2008 Server allows you to automate more of the tasks that have previously been
done manually. Windows Task Scheduler uses and event based model which allows you to define a series of
conditions which trigger a scheduled task. The addition of event based triggers provides a powerful way to automate
system management.
Setting Value
Name Weekly Defrag
Trigger Weekly
Recurrence 11:30PM on Friday
Action Start a program
Program/Script C:\windows\system32\defrag.exe
Note: Notice the new task listed in the Upper-Middle pane. In the Lower-Middle pane
you can see the details of the task.
k. Click the Triggers and Actions tabs to see the details.
l. In the Actions pane, click Properties.
m. Under Security Options select Run whether user is logged on or not.
n. Check Do not store password.
o. Check Run with highest privileges and then click OK.
p. In the Actions pane click Run. This will immediately run the task without waiting
for the scheduled time.
Note: You will not see the defrag application running.
q. In the Lower-Middle pane, click History. This will show you the events related to
Page 6 of 10
Managing Windows Server 2008 Using New Management Technologies
Tasks Detailed Steps
this task, and let you know whether or not it ran, or if there were any errors with
running the task.
Note: You may have to refresh Task Scheduler Library to notice that the task has run.
2. Create a Task to Note: The Woodgrovebank administrator monitors several secure servers which get
Respond to a System powered on, but not logged on. The administrator wants to be alerted if anyone does
Event successfully log onto these Servers. In this exercise you will create a task to display a
message whenever the secure workstation gets logged on to.
Note: Complete this task from the NYC-SRV-1 computer as
Woodgrovebank\Administrator.
a. Click the Custom Tasks folder.
b. In the Actions pane, click Create Task.
c. In the Create Task dialog box, in Name type Log on to Secure Workstation.
d. On the Triggers tab, click New.
e. In the Begin the Task list, select At log on and then click OK.
f. On the Actions tab, click New.
g. In the New Action dialog box, in Action, select Display message, in Title, type
Log on Warning, and then in Message, type You have just logged on to a secure
workstation, ensure you log off when you are finished.
h. Click OK to close the New Action dialog box.
i. Click OK to close the Create Task dialog box.
j. Close all programs and log off
k. Log on to NYC-SRV-1 as WOODGROVEBANK\Administrator
l. Once your desktop appears, in the Log on Warning dialog box click OK.
3. Configure the AT Note: The AT Service account is used by Windows 2008 Server when you schedule a
Service Account task by using the command line, instead of the Task Scheduler user interface. In this
task we will create an account to be used, instead of the default localsystem account.
Note: Complete this task from the NYC-SRV-1 computer as
Woodgrovebank\Administrator.
a. On the Start menu, in Start Search, type compmgmt.msc and then press
ENTER.
b. In Computer Management, click Task Scheduler.
c. In the Actions pane, click AT Service Account Configuration.
d. In the AT Service Account Configuration dialog box, click Another User
account, then click “Change user”. At the sign in box type
WOODGROVEBANK\Administrator. Enter pass@word1 as the password and
click OK. Then click OK again.
e. On the Start menu, navigate to All Programs/Accessories, right-click Command
Prompt and then click Run as administrator.
f. In the command prompt, type the following command where hh:mm is three
minutes after your current 2008 time using the 24 hr clock and then press
ENTER.
Page 7 of 10
Managing Windows Server 2008 Using New Management Technologies
Tasks Detailed Steps
open your Task Manager by right-clicking the task bar and clicking Task
Manager
Note: You may have to refresh this screen again at the appropriate time.
j. Click the Processes tab and ensure Show Processes from all users is selected.
Notice calc.exe is running in the background. It is running as the Administrator
account, which is what you previously configured as the AT Service Account.
k. Close the Task Manager and click the At1 scheduled task. In the Lower-Middle
pane, select the History tab. Double click the top event listed and notice which
user account is being used to run the task. Close the dialog box.
l. Click and then right-click Task Scheduler in the Explorer pane, and then click AT
Service Account Configuration. Change this back to System Account and click
OK.
m. In Computer Management, in the contents page, click AT1 and then on the
Actions menu, click End.
n. In the Task Scheduler dialog box, click Yes.
o. Close Computer Management. Close the Command Prompt window.
Page 8 of 10
Managing Windows Server 2008 Using New Management Technologies
Exercise 3
Managing Computers Using Windows Remote Management
(WinRM)
Scenario
Windows Remote Managed (WinRM) allows a Windows 2008 Server computer to be managed using WMI over
HTTP or HTTPS. A WinRM listener is created on the computer to be managed. The WinRM listener accepts WMI
based commands from a computer and returns the results of the commands. Commands can include querys or
actions. WinRM is secured using a combination of WMI ACLs, HTTPS, and Kerberos, Windows Integrated, or
Basic authentication. All communication is done using the SOAP protocol.
WINRM QuickConfig
c. WinRM could already be configured on this server if so just go on to next step
otherwise: In the command prompt, type Y and then press ENTER.
Complete the following 5 Note: The WS-Management GET operation returns the value of a specific WMI object.
tasks on: In the following example, WS-Management retrieves the properties of the WinRM
service running on NYC-SRV-1.
Note: Perform this task on NYC-DC-1 as Woodgrovebank\Administrator.
NYC-DC-1
2. Perform a GET
a. In the command prompt, type the following command and then press ENTER.
Operation
winrm get wmicimv2/win32_service?name=WinRM –remote:NYC-
SRV-1
b. In the command prompt, type the following command and then press ENTER.
Page 9 of 10
Managing Windows Server 2008 Using New Management Technologies
Tasks Detailed Steps
a. In the command prompt, type the following command and then press ENTER.
Page 10 of 10