Skip to main content

NightWatchman Enterprise 7.3

Example NightWatchman configurations

Policy

Description

Shut down all computers in the evening

This is the most common use for NightWatchman. Powering-off computers is the best way of saving energy and it also ensures that they have a clean start each day. NightWatchman ensures that as many systems as possible are shut down, executing scripts to make sure that any active applications that have been left running are closed and user data is saved. For example,

NightWatchman.exe 
–scheduledactions ="ALLDAYS(20:30,PowerOff,Force)"

If we have a policy that:

    • initiates a power off at 20:30

    • prompts the user that power off is going to take place and give them a 5 minute countdown to allow for the fact that they might be away from their desks

    • allows users to defer the power off for half an hour.

    • try and shut down every half an hour (for twenty times to catch the moment when late night users have finally left their computers).

we implement this with (some are at their default values, but are included for clarity)

NightWatchman.exe 
–scheduledactions="ALLDAYS(20:30,Normal,Active)" 
-countdownsecs=300 
-retryinterval=30 
-retryattempts=20 

Shut down computers on certain days of the week

This policy is implemented with shutdowndays. For example, to set the scheduler to run only on Sunday, Tuesday, Wednesday and Friday:

NightWatchman.exe 
–scheduledactions="SUN,TUE,WED,FRI(20:30,Normal,Active)" 

and to set the scheduler to run each day from Monday until Friday.

NightWatchman.exe 
–scheduledactions="WEEKDAYS(20:30,Normal,Active)"

Log-off users in a secure environment

In secure environments, it is a requirement that users are logged-off from systems when they leave the office. NightWatchman can log-off users even if the system has been locked or if a password-protected screensaver is in use. It can force the system to shut down if you want to be absolutely sure that your systems are shut down each day whilst still attempting to save user data and close applications using the NightWatchman scripts.

For example, to enforce a power-off on all machines at 20:30 with no user intervention, run the following from the System Tray interface:

NightWatchman.exe 
–scheduledactions="ALLDAYS(20:30,PowerOff,Force)"

Enforcing company-wide power schemes

Aside from powering off machines and logging-off users, NightWatchman can also control the power schemes currently in use. This means that the settings for power conservation, such as putting the monitor, hard disks and computer into standby mode, can be unified into an enforceable company-wide scheme.

The commands available for managing the power schemes mirror the options that are available to the user through the Windows System Property dialog which are

  • switches that control the settings when the machine is on mains power

  • those that control the settings during battery operation.

If we have a policy that:

  • reapplies the power scheme options every log on (thereby overriding any local settings)

  • sets the monitor to switch to standby after 5 minutes of inactivity

  • sets the disks to standby every 10 minutes

  • sets the computer to switch to standby every 15 minutes

we implement this with:

nightwatchman.exe 
-powerscheme=ON 
-monitorac=5 
-diskac=10 
-standbyac=15

Close all applications prior to a software distribution

NightWatchman can be used to manipulate applications prior to a software update. For instance, if you have scheduled an enterprise-wide update of Microsoft Outlook, you want to make sure that Outlook is not running on systems otherwise the update will fail.

NightWatchman scripts can be used to close applications, save documents, manipulate dialog boxes and perform many other automation tasks using the NightWatchman ActiveX control.

Shutting down a computer remotely

If a remote administrator wants to safely shut down a particular computer running NightWatchman, they can run their own local copy of NightWatchman and specify the remote computer they want to shut down, for example changing to the NightWatchman installation directory and running:

nightwatchman.exe 
<PCName> -shutdownnow 

where <PCName> is the name of the computer to shut down.

Alternatively, they can send a command using Configuration Manager or another systems management tool to prompt NightWatchman on the remote computer to shut down, for example:

 <NightWatchmanPath>\nightwatchman.exe 
-shutdownnow 

where <NightWatchmanPath> is install location for the NightWatchman executable.

Note

The default install location for NightWatchman is %program files%\1E\Agent\NightWatchman.