Exercise Overview:

NightWatchman Management Center uses power policies to define the NightWatchman settings, including power-down schedules, alarm clocks, maintenance windows and power schemes. In this lab, you will learn how to create polices that define power management configuration and apply these policies to groups within the console.

Creating a Power Policy

In this exercise, you will create a new Power Scheme, and a new Power Policy that will include a new Power Scheme.

Create a Power Scheme

Power Schemes in NightWatchman enforce settings in the Windows Power Scheme on the targeted computer. Power Schemes are defined in the console and selected as part of the policy configuration that is applied to groups in the console.


  1. On 1ETRNAP, start the NightWatchman Console and select the Power Schemes tab
  2. You will see a few power schemes already defined in the console. These are from the restored database. Feel free to explore these.
  3. Click the Add button to create a new Power Scheme
  4. Enter a name of your choice to identify the Power Scheme you are about to define
  5. Choose your preferred values for the various settings and make a note of them
  6. Click OK to save your Power Scheme

Review Computer Reclaim Settings

The "Hardware Utilization" feature of previous versions of NightWatchman have been replaced with "Computer Reclaim" in NightWatchman 7.2. Hardware Utilization made use of power state data to identify computers that were suspected of low or no usage. However, trying to identify usage of a computer by solely relying on the power state is not necessarily reliable. Computer Reclaim monitors keyboard and mouse activity, using the data collected to identify rarely used and unused computers. This is a more accurate method of identifying computers that are actually used.

In this task we will identify the Computer Reclaim settings in the NightWatchman console.

  1. In the NightWatchman Console select the Settings tab
  2. In the Computer Reclaim section observe the settings that are present



Sample Interval (secs)

The frequency of PC usage sampling

Aggregation Interval (mins)

How often computer reclaim reports the most common findings for the sample intervals

Making the sample interval and aggregation interval small and the same periods enables very granular determination of rarely used computers. For example, 5, 10, or 15 minutes allow you to report on computers that have only be used for those periods of time or less. If you set the period to one hour, you can only report on computers that might been used for one hour or more.

The sample interval must be smaller than or the same size as the aggregation interval.

Create a Power Policy

In this task, you will create a Power Policy, which will incorporate the Power Scheme you created in the previous task, along with a number of other settings.


  1. In the NightWatchman Console select the Power Policies tab
  2. You will see a few power policies already defined in the console. These are from the restored database. Feel free to explore these
  3. Click the Add button to create a new Power Policy
  4. On the Add Power Policy dialog box, enter a name of your choice to identify the policy you are about to create
  5. On the General tab, in the Power Scheme drop-down select the Power Scheme you created in the previous task and enable Monitor Computer Reclaim (we'll revisit these later)
  6. Note that on the General tab in the Client Scripts section you can also enable the PreRun script and select which power-down actions (power off, sleep and hibernate) should include execution of this script. The Other settings allow some control over the user interface and behavior when a ConfigMgr job is running or about to run. Refer to the online documentation for details on how all these options can be used.
  7. Select the Scheduled Actions tab. Note that different power-down times and actions can be defined for each day of the week. Choose your preferred options and keep track of them
  8. The Legacy Agents option is provided to support older clients. Prior to v6.1, you could only define a single power-down time, which could be applied to the days of your choice. V6.1 introduced the ability to define a different shutdown time and action per day. You will need to set the Legacy Agents value if you want to manage any clients in your environment that are still running version 6.0.
  9. Select the Power Down Defaults tab. Note the default settings. Change the Countdown (secs) from 30 to 120
  10. Input a custom message in the Message box
  11. This tab defines the default Power-down action and logoff action, retry behavior when a scheduled power-down attempt is aborted (e.g. by user interaction, process exception etc.) and an optional User Activity timer. If a User Activity Idle value is specified, the power-down will not be attempted if there has been user activity within the defined period. Finally, there is the option to provide a custom message to the end user when the countdown dialog is displayed prior to attempting a scheduled power down
  12. Select the Alarm Clock tab. Select Enable Alarm Clock and define the time (of your choice) each morning that computers should be woken up so they are ready for users to start working when they arrive
  13. Select the Maintenance Window tab. Select Enable Maintenance Window and define the time (of your choice) for a single night that computers should be woken up to execute maintenance tasks, the duration that the computer should stay awake for and the action to be taken at the end of the maintenance window
  14. Select the Process Exceptions tab
  15. Use the Process Exceptions tab to define the name of processes (.exe files) that should cause a scheduled power-down attempt to be aborted if the process is running at the time. Leave it empty for now, we will come back to this later.
  16. Select the Sleepless Client Detection tab
  17. The Sleepless Client Detection tab enables an administrator to define processes (.exe files) that would normally prevent a computer going to sleep via a Power Scheme, allowing NightWatchman to override this behavior if the computer is being put to sleep by the operating system (note that this only applies when the computer is put to sleep using a Windows Power Scheme – a scheduled NightWatchman power-down will power-down the computer regardless of any sleepless processes that may be running.
  18. Click OK to save your new Power Policy
  19. If the new Power Policy does not appear in the list even after refreshing, close the console and reopen it to see it in the list

Power Policies

In this exercise, you will apply your new Power Policy to the 3rd Floor group. You will then move the lab clients into that group and observe the policy being applied to these clients.

Apply a Policy to a Group


  1. From the NightWatchman Console, select the Clients tab and ensure the Location Groups tab is selected
  2. Expand the group tree (Region\United Kingdom\London\Ealing) to reveal the 3rd Floor group
  3. Right-click 3rd Floor and select Apply Power Policy
  4. Note that a list of defined Power Policies is displayed. Select the policy you created in the previous exercise
  5. Policies can be applied to any tier group within the group hierarchy. Priority is given to the policy applied at the lowest tier, which replaces entirely any policies applied to higher tiers (i.e. the policy settings are not merged).
  6. Note the red star that appears on the 3rd Floor group icon, indicating a Power Policy has been applied to that group. Hover the mouse pointer over the group and note the Power Policy and Tariff applied to the group are displayed in the 'tool-tip'
  7. Note that a previously applied Power Policy can be unlinked from the group by selecting <none> in the list of available policies. However, this action in itself does not revert any power management settings on the client, which will only be modified if there is a different policy applied to a group in one of the higher tiers of the group hierarchy. Thus, it is useful to have a 'blank' policy created in case you want to revert a set of machines to have no power policy.

Add the Lab Clients to the 3rd Floor Group

In this task, you will move the lab workstations to the 3rd Floor group so the new policy will be applied to them.


  1. Move the five lab workstations (1ETRNW101, 1ETRNW102, 1ETRNW71, 1ETRNW71 and 1ETRNW73) from the UNASSIGNED BUILDING group to the 3rd Floor group
  2. With the UNASSIGNED BUILDING group selected, use the Search box to find all computers with names starting 1ETRN. (There should now be none as you have moved them)

Remove Existing Power Policies

As you are working on a restored database, there are some policies already defined and applied to groups within the Organization structure. Policies applied to groups in the Organization structure have priority over those applied to groups in the Location structure (later you'll learn to use this to your advantage to exclude specific computers from power management regardless of which location they are in). In this task, you will remove the policies applied to the Organization groups so they don't interfere with your new policy.


  1. From the Clients tab in the NightWatchman Console, select the Organization Groups tab
  2. Note that the UNASSIGNED DEPARTMENT group has a red star above its icon, indicating it has a policy applied. If you hover over this group, you will see the policy applied is named TURN OFF HIBERNATE.
  3. UNASSIGNED DEPARTMENT is the default Organization group, which the lab computers (1ETRNxxxx) were previously members of
  4. Right-click the group and select Apply Power Policy then select <none> from the list. This will remove the policy assignment and the policy will no longer be applied to clients in this group
  5. Repeat this for any other Organization groups that have a policy applied (be sure to expand the entire tree and check all tiers)

Validating the Policy Application

In this task, you will verify that the new power policy has been applied to the lab computers.


  1. Log on to 1ETRNW71 as 1ETRN\user
  2. NightWatchman commands used in this exercise can only be executed by an administrator. At this stage, it is unlikely that the policy has been applied. Hover over the NightWatchman icon in the task bar and note what the text indicates.
  3. Observe the green NightWatchman icon in the systray
  4. Start an administrative command prompt and change directory to C:\Program Files\1E\NightWatchman
  5. Run the following command:
  6. nightwatchman.exe -powerpolicyrefreshnow
    This command is only to be used in test environments when validating applied policy settings on small numbers of PCs, or if a policy needs to be applied immediately in an emergency situation. Its purpose is to reduce delays caused by waiting for polling intervals. The command will cause the client to check for policy within a five minutes' random delay.
  7. Open the NightWatchman agent log file (C:\windows\ccm\logs\NightWatchman.log) and search for the text Next policy refresh will occur at to determine when the policy will be updated
  8. Observe the log file as the policy refresh occurs and note in the log the settings that are modified by the policy
  9. Note that the NightWatchman icon on the task-bar has changed its appearance once policy has been updated– it now has a green star on the screen that indicates a power-down schedule has been applied. Hover over the icon and observe the change in verbiage.
  10. Run regedit and open the HKLM\Software\1E\NightWatchman key. Observe the settings in the AlarmClock, MaintenanceWindow, PowerSettings and ScheduledActions keys
  11. Log on to 1ETRNW101 as 1ETRN\User and repeat the above to ensure the new power policy has been applied

Excluding Computers from Power Policy

In most environments, there are likely to be exceptions within a defined group – computers that should not be powered down for whatever reason. If these cannot be logically grouped by themselves, there is a behavior of the NightWatchman policy feature that can be used to our advantage here – policies applied to Organization Groups take precedence over policies applied to Location Groups. You will recall that a computer will be a member of one Location group and one Organization group.

In this exercise, you will create a new Organization group and assign it a policy that has no power management enabled. You will then add one of the lab clients to this group and observe the behavior on the client.

Examine the 'No Power Management' Power Policy

In this task, you will examine a Power Policy named No power management that was created by an administrator and exists in the restored database. This Power Policy has no scheduled shutdowns, no Alarm Clocks and no Maintenance Windows, which will effectively cancel any shutdown actions previously configured on the computers it is applied to.

Note that to prevent power management it is necessary to apply a policy that has no power management applied, rather than simply not apply a policy at all, as it is possible that the client would inherit policy from a higher group, or may have values already defined in the registry.


  1. From the NightWatchman Console, select the Power Policies tab, then select the No power management policy and click Edit
  2. This policy was previously defined by an administrator and is available because you are working on a database restored from that environment. It is good practice to create a similar policy in all NightWatchman environments and use the technique in this exercise to safely manage exclusions.
  3. Review the settings on the Scheduled Actions, Alarm Clocks and Maintenance Window tabs. Note that these explicitly define no shutdown or wakeup actions
  4. Click Cancel to close the Edit Power Policy dialog box

Create a New Organization Group

You will now create a new group in the Organization grouping structure to contain the computers to be excluded from power management. You will then add 1ETRNW101 to this group


  1. In the NightWatchman Console, select the Clients tab then select the Organization Groups tab
  2. Expand the Organization Groups branch out to Company\Subsidiary\Division
  3. Create a new group level below Division named Department. Repeat the process to create a group under the Department group named Exclusions
  4. Remember that five tiers need to be defined and computers can be added only to the fifth tier.
  5. Use the method you learned earier to move 1ETRNW101 from UNASSIGNED DEPARTMENT to Exclusions

Apply the Blank Policy to the Exclusions Group

You will now apply the No Power Management policy to the Exclusions group.


  1. Use the method you learned in before to apply the No power management policy to the Exclusions Organization Group

Validate the Exclusion is Applied

The lab client 1ETRNW101 is now included in the 3rd Floor location group, which has the Power Management Policy you defined in the section Creating a Power Policy applied to it and also the Exclusions organization group, which has the No Power Management policy applied. You will now observe the effect of this configuration.


  1. Use the method you learned earlier to force a power policy update on 1ETRNW101
  2. If you get an access denied message in the cmd window, you need to close it and open up a cmd window with the Run as Administrator privilege from the start menu
  3. Observe the changes (look in the NightWatchman.log file, registry and hover over the NightWatchman icon in the task bar) when the new power policy is applied

Lab Summary

In this lab, you have seen how power policies are created in the NightWatchman console. These policies can be applied to Location Groups and/or Organization Groups. A policy applied to a group will be inherited by all descendants of that group and will take precedence over any policy applied to its parent group. Policies applied to Organization Groups take precedence over policies applied to Location Groups. Computers can be easily excluded from power management by defining a 'No power management' policy, applying this to an Exclusions Organization Group and moving computers to be excluded into this group.

Next Page

Ex 4 - NWM v7.3 - Using - Understanding the User Experience