Advanced components
NightWatchman Enterprise provides a number of advanced features that deal with specific scenarios and limitations. The following sections provide details on each of the features.
The NightWatchman Agent has four key areas you can manage:
-
Scheduling power-offs.
-
Defining the actions taken to log-off a user.
-
Creating or modifying power-off scripts.
-
Setting the actions taken to power-off the machine.
As the administrator, you can schedule the system to shut down at a certain time on certain days of the week. You, or the end-user, can also request an immediate power-off.
If there are users logged on the system when a power-off is initiated, the log-off action takes place. If not, NightWatchman proceeds directly to the power-off stage.
If a computer is already in standby or hibernate mode, it will not be woken to shut it down.
There are three log-off modes that can be set:
-
Passive: If users are logged on, no attempt will be made to shut down.
-
Active: Users are asked if the power-off is allowed to continue.
-
Force: Users are notified that a power-off is about to take place and will be logged off once the countdown expires.
You can set a countdown for a power-off, so in Active and Force modes, users see a countdown to the event. In Active mode, the user has the option to cancel the power-off or enable the event by clicking OK. If the user postpones the event, NightWatchman can be set to retry again later.
If the modes are Active or Force, NightWatchman runs the power-off scripts. The four scripts which enable administrators to power down computers are:
-
PreRun.
-
power-off.
-
RunAlways.
-
RunOnResume.
Refer to NightWatchman scripts and Windows 1E NightWatchman Agent scripting reference.
NightWatchman power schemes and reporting data
NightWatchman automatically configures the power scheme to enable processor speed and voltage to vary automatically with system usage, specifically for machines using Intel speed step processors or AMD Cool n' Quiet processors. This results in enhanced energy saving on machines with low average utilization (most office productivity machines). On Windows 7, this involves the creation of a new NightWatchman power scheme based on the Balanced Power Scheme.
From the point of installation, NightWatchman reports inventory and power state data for its local computer back to the reporting server. The inventory information includes:
-
Computer name.
-
Computer domain.
-
IP address and subnet.
-
Network card MAC Address.
-
Chassis model, type and manufacturer.
Power state data shows how long the computer is in a particular power state and is used in conjunction with associated typical power consumption information to calculate how much power the computer is consuming throughout the day. Inventory information helps identify the computer and determine any information related to its type, such as its typical power consumption figures.
The NightWatchman Management Center Console lets you define:
-
Location groups – enables you to model your company according to the physical location of the computers. You can report on and apply location specific power settings to computers according to where they reside. For example, if you know of a forthcoming national holiday, you can apply a one-off policy that sets particular power settings for that specific location only. You can also use these groups to apply specific localized tariffs that increase the accuracy of power cost reports.
-
Organization groups – enables you to model your company according to organizational units. You can report on and apply specific power settings to computers according to where they sit in the organization. For example, if you know of an off-site team building exercise for a particular department, you can apply a one-off policy that sets particular power settings for that department only.
NightWatchman pre-event tests
When a scheduled power-down event is triggered (and before the Hibernate, Standby, power-off or Reboot events starts), NightWatchman runs the following tests:
Test |
Description |
---|---|
Passive |
If logoffaction=Passive, check to see if users are currently logged on to the computer. If found, cancel the scheduled event. |
Last man standing |
Check to see if the computer is set to be last man standing. If so, cancel the scheduled event. Windows only test. |
User activity |
Check for user activity, If found, cancel the scheduled event. This test is not performed if:
|
Exception list |
Check to see if any processes on the process exception list are currently running. If so, cancel the scheduled event. |
Configuration Manager running jobs |
If Configuration Manager client exists and monitorjobs=ON, check for currently running jobs. If found, cancel the scheduled event. If the computer is a laptop running on batteries, this test is by-passed and the scheduled event is allowed to proceed regardless. |
Configuration Manager pending jobs |
If Configuration Manager client exists and monitorjobs=ON and pendingjobwindowmins is set, check for pending jobs. If found, cancel the scheduled event. If the computer is a laptop running on batteries, this test is by-passed and the scheduled event is allowed to proceed regardless |
Nomad in-progress file transfers |
Check to see if the computer is acting as the Nomad P2P master. If so, cancel the scheduled event. |
Nomad PBA content found |
Check to see if the computer has content that Nomad is holding as part of its Peer-Backup Assistant functionality. If so, cancel the scheduled event. |
Keep active status |
Check the Keep Active status on the NightWatchman user interface. If set, cancel the scheduled event. |
Active maintenance window |
If a NightWatchman maintenance window is active, cancel the scheduled event. |
Because the 1E Agent will cancel a scheduled power down event when there are pending or running Microsoft Configuration Manager jobs, it is recommended to set logoffaction=FORCE when attempting to power down a computer after successfully running a Configuration Manager software distribution Advertisement.
An alternative would be to use the NightWatchman command-line and set a once-off power down with logoffaction set to ACTIVE or PASSIVE to power down the computer at a specific time and let it retry until the Advertisement has finished running.
NightWatchman events
The following takes place when a NightWatchman event is triggered.
Event |
Sequence |
---|---|
Hibernate or stand-by |
|
Power-off or reboot |
|
Resume from a low-power state |
|
-
Learn how to configure NightWatchman or modify its scripts, refer to Example NightWatchman configurations.
-
Learn about the switches that control NightWatchman functionality, refer to Command-line switches.
End-user actions
When you enable the NightWatchman system tray interface (refer to NightWatchman Agent and 1E Agent for Mac), the end-user can do the following:
-
Keep their computer active by opting out of passive or active NightWatchman power-offs for a period of time.
-
Initiate a local power-off.
-
View the list of files backed-up during the last log-off process.
You may also want to audit end-user interaction with the NightWatchman backup dialog and resolve issues with backups that occasionally do not appear in the backup list. The 1E Agent tracks basic end-user choices when selecting the Save or Reject options in the Backup Dialog.
For each file that the user chooses to accept or reject, an entry is added to NWMAudit.log, which is created in the per-user NightWatchman data folder. for example, C:\Users\joey.malloy\AppData\Local\1E\NightWatchman.
Each entry indicates the time of the operation, the original document name, whether the user chose to Keep or Reject the Managing client groups file and, where applicable, the name of the file that the backup was saved to.
You can set different power down times on different days of the week using different power down and log-off actions. The previously used switches: shutdowndays, shutdowntime, shutdownaction and logoffaction are still supported but we recommend moving to the new enhanced syntax at your earliest convenience.
The following examples illustrate scheduledactions in practice. Note the slight differences between in syntax for Windows computers and Mac. The command-lines are broken down to separate rows for clarity – they are executed as single line.
Refer to Command-line switches.
Event |
Command-line |
---|---|
Power off a machine with a logoffaction of force everyday at 18:00 |
Windows: Copy
Mac: Copy
|
Power off a machine with a logoffaction of force on weekdays at 18:00 and a passive log-off and hibernate at 1300 during the weekends |
Windows: Copy
Mac: Copy
|
Power off a machine with a logoffaction of force on Mondays and Tuesdays, passive log-off and standby at 20:00 on Wednesdays and an active hibernate at 17:00 on Thursday and Fridays |
Windows: Copy
Mac: Copy
|
Clear all daily power off events |
Windows: Copy
Mac: Copy
|
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: Copy
If we have a policy that:
We implement this with (some are at their default values, but are included for clarity). Copy
|
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: Copy
And to set the scheduler to run each day from Monday until Friday: Copy
|
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: Copy
|
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
If we have a policy that:
We implement this with: Copy
|
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: Copy
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: Copy
where <NightWatchmanPath> is install location for the NightWatchman executable. The default install location for NightWatchman is %program files%\1E\Agent\NightWatchman. |
NightWatchman supports alarm clocks (makes a computer ready for a user) and maintenance windows (makes a computer ready for unattended maintenance). These events are set using the NightWatchman Management Center Console (recommended) or from the command-line.
When configured using the command-line at the client, NightWatchman will set the desktop computer to wake from sleep.
When configured centrally using the NightWatchman Management Console and with an implementation of WakeUp, computers in an off-state will additionally be woken. If a laptop is connected to the LAN at this point, it is assumed to be connected to power and will also be woken.
All the times for alarm clocks and maintenance windows refer to the local time on the computer where the event is taking place. So, if you set an alarm clock for 09:00 and apply that to computers in the UK and in the US, those computers will wake up at 09:00 in their respective time zones.
NightWatchman will not wake a laptop from sleep for alarm clocks or maintenance windows. If you are using Configuration Manager and have many site servers, these events should be set using dummy Configuration Manager advertisements for performance reasons. Client computers are brought out of a low-power state up to 5 minutes before an alarm clock or maintenance window event to ensure that they are available at the pre-determined time.
Alarm clocks
Alarm clock definitions consists of a day of the week and a time when it should operate. For example, you may want all machines in a development department to be available from 08:00 Monday to Friday, except Thursday where there is a team meeting and the machines should be available from 10:00.
Setting alarm clocks from the command-line
On the NightWatchman command-line, you set alarm clocks using alarmclock and mwturnonmonitor, refer to maxlogfilesize. When using this method to define alarm clocks, you can only bring client computers out of a sleep state and not from a power-off state.
To bring clients out of a power-off state you must use the NightWatchman Console together with WakeUp. For example, to set a weekly alarm clock for the above profile for Windows:
nightwatchman
-alarmclock="monitorstate=on|
mon(08:00)|tue(08:00)|wed(08:00)|thu(10:00)|fri(08:00)"
And on the Mac:
./nightwatchman -alarmclock mon=08:00, tue=08:00, wed=08:00, thu=10:00, fri=08:00
On Windows computers, if you want the display to turn on at the same time as the alarm clock, set acturnonmonitor as well, refer to maxlogfilesize:
nightwatchman -acturnonmonitor=on
Setting alarm clocks from the NightWatchman Console
Alarm clocks can also be defined using power policies. One advantage of using a power policy to set alarm clocks is that if WakeUp integration is enabled, you can bring a computer out of a power-off state as well, unlike the command-line restriction, where you can only bring a computer out of a sleep state.
Keeping a computer awake after an alarm clock
By default, an alarm clock call keeps a computer awake by preventing power schemes from operating for 60 minutes. This value is configurable at install time, see KEEPAWAKEAFTERWAKEUPMINS.
Maintenance windows
A maintenance window definition consists of a day of the week and a time when it should operate, the duration and the action to take at the end of this window. For example, you may want all machines in a network to be available at 02:00 every Wednesday to receive Windows updates.
Setting maintenance windows from the command-line
On the NightWatchman command-line, you set maintenance windows using maintenancewnd and mwturnonmonitor. When using this method of defining maintenance windows, you can only bring the client computer out of a sleep state and not from a power-off state.
To bring clients out of a power-off state you must use the NightWatchman Console combined with WakeUp. For example, to set a weekly 1-hour maintenance window at 02:00 on a Wednesday after which the computer goes into standby with the display remaining off at all times:
nightwatchman
-maintenancewnd="monitorstate=off|
wed(02:00,60,1)"
You can also configure the display to behave differently from maintenancewnd using mwturnonmonitor. For example, to turn the display on during maintenance windows:
nightwatchman
-mwturnonmonitor=on
Setting maintenance windows from the NightWatchman Console
Maintenance windows can also be defined using power policies. One advantage of using a power policy to set maintenance windows is that if WakeUp integration is enabled, you can bring a computer out of a power-off state as well, unlike the command-line where you can only bring a computer out of a sleep state.
This feature is only applicable on Windows operating systems.
NightWatchman provides sleepless client detection to optimize a computer's ability to go into a sleep state, increasing power savings and energy efficiency in your organization. This feature specifically handles sleep events that occur due to Windows idle timers, for example a computer going to sleep after 30 minutes of inactivity. Sleepless client detection is not applicable for NightWatchman initiated power down events.
Sleepless events occur frequently in normal computer usage, sometimes for very valid reasons and sometimes not. For example, you would not want a computer running a PowerPoint presentation to hibernate in the middle of an important slide. However, if you have left your computer for a long period of time, and it is not running any important tasks, then it should be saving power.
Sleepless client detection identifies the reasons why computers are being prevented from sleep, and enables the administrator to make informed decisions. It reports faulty input devices that are keeping the computer active by mimicking user keyboard or mouse activity. NightWatchman looks for at least one 30 second inactive period in the last 24 hours. If this has not occurred, it reports the input device as potentially unreliable.
In addition, sleepless detection identifies specific processes that are preventing an unattended computer from entering into a low-power state. These sleepless processes are defined as:
-
Busy process – a process that is causing CPU usage to exceed a set threshold
-
System required process – a process that has an OS execution state flag set to say that it is required. It therefore stops a computer from entering a suspend state due to a period of inactivity
NightWatchman can be set to ensure that busy processes on Windows Vista do not prevent a computer from sleeping, thereby reproducing the Windows 10, Windows 8.1 or Windows 7 behavior. To do this, set busyprocessdetection=off
By default, NightWatchman is set to enable the default Windows Vista behavior where busy processes will prevent a computer from sleeping. This enables a baseline to be created that accurately measures system behavior prior to implementing NightWatchman savings.
When a default power policy is set from the NightWatchman Management Center Console, busyprocessdetection=off. NightWatchman also defaults to identifying system required processes by name and report these centrally. This is known as Advanced Sleepless Client Detection. The administrator can review this and add them to the sleepless exclusion list. NightWatchman ensures that a process named on the sleepless exclusion list cannot prevent the computer from sleeping.
Advanced sleepless client detection can be disabled at install time (use advancedsleeplessdetection=off on the command-line) or from the NightWatchman Management Center Console in a power policy definition. If you disable this feature, or if the version of the Windows kernel does not support querying process information, it will not be possible to identify the name of the process that is preventing the computer from going to sleep. However, faulty input devices will still be identified.
Reports
Sleepless detection information appears in two NightWatchman reports under the heading Sleepless Client Detection.
-
Busy and Sleepless Processes – reports processes running on the client computer that are the likely cause for it not entering into a low-power state.
-
Untrusted input device – reports potentially faulty input devices that are the likely cause for a client computer not entering into a low-power state.
Exclusion lists
Once you have reviewed the NightWatchman reports that identify potential reasons why a particular computer is being kept from entering into a sleep state, you can choose to add any processes named in the report to the sleepless exclusion list. You can add process names to the sleepless exclusion from:
-
NightWatchman Console – the most convenient is from a power policy in the NightWatchman Console. We recommend that the power policy with the excluded processes only gets applied to the computers reported against in the NightWatchman Busy and Sleepless Processes report.
-
1E Agent command-line – there are a number of command-line switches that control the exclusion list such as: selistshow, selistadd, selistdel, selistfrom, and selistclear.
There are four types of scripts which give administrators complete flexibility to ensure that computers can be powered down, whatever the circumstances. All scripts are run in the context of the logged on user. these script types are:
-
Pre-run.
-
Power-off.
-
Run always.
-
Run on resume.
PreRun script
This script is set to run before all other actions. At the start of any scheduled event and depending on the status of the -prerun option, NightWatchman runs this script to have control over whether the scheduled event continues.
-
If it fails (exits with a non-zero error code), the scheduled event is automatically postponed and will retry after the standard period defined in retryinterval.
-
If it succeeds and shutdownaction is Standby or Hibernate, the machine is put into one of these states.
-
If it succeeds and shutdownaction is Normal, Reboot or Logoff, the process exception list is checked. If any of the processes in the exception list are currently running, the scheduled event is aborted.
During a NightWatchman installation, a default PreRun script is created that explicitly performs no action and only returns a success code. The script is commented to enable the functionality to be customized easily.
The script can be run prior to displaying the countdown dialog to enable you to carry out pre-flight checks. If any of these checks fail, the NightWatchman power down can be silently cancelled without notifying the end-user. This script is enabled by running - prerun=ON on the command-line.
Power-off scripts
Runs when powering-off or restarting a computer, depending on whether their associated application is running at the time.
-
If a user is logged onto the system and a power-off starts, an attempt is made to save all currently open and edited documents. This is implemented using application power-off scripts – there must be a script for each application that is open. If an application has no corresponding script and has unsaved data, the event is aborted.
-
If the log-off action is Active, all power-off scripts must succeed before the event takes place
-
If the log-off action is Force, the system is powered off regardless of whether the power-off scripts are successful or not
The scripts are ensure that managed applications are gracefully closed and user data is saved. This occurs prior to a log-off or system power-off initiated by NightWatchman. These scripts handle eventualities such as saving current versions of all open files as well as making backups of previously saved versions so users can back out of latest changes if they prefer not to keep them. Any open dialogs are also handled in order to execute the closure of the application in a safe way. Scripting NightWatchman for Mac requires knowledge of AppleScript – it does not use a similar mechanism to the script helper provided for NightWatchman for Windows.
RunAlways script
Runs after the countdown dialog and after all the other scripts during a power-off, logoff or reboot depending on the status of runalways. It may also be run on Hibernate and Standby actions depending on the status runalwaysforsleep option.
Refer to NightWatchman command-line switches for details of referenced switches.
-
If it fails (exits with a non-zero error code), the scheduled event is automatically postponed and will retry after the standard period defined in retryinterval.
-
If it succeeds and the NightWatchman shutdownaction is Standby or Hibernate, the machine is put into one of these states
-
If it succeeds and the NightWatchman shutdownactionis power-off, Reboot or Logoff, the process exception list is checked. If any of the processes in the exception list are currently running, the scheduled event is aborted.
This script can be run at the end of this process unlike the application power-off scripts (which will only run if the application to which they relate to is also running) – it will always execute, if it exists on disk and -runalways=ON is set. If you want the RunAlways script to run prior to a NightWatchman initiated hibernate or standby, set -runalwaysforsleep=ON from the command-line.
RunOnResume script
Runs on resuming from a low-power state depending on the status of runonresume. The success or failure of the script has no effect on the resumption of the computer. The RunOnResume script can be used to refresh network connections for running applications. For example, restarting Outlook on resumption if it is running in non-cached mode.
The PreRun script is not executed if a user power off is initiated from the Start menu or by a <CTRL-ALT-DEL>.
The PreRun and power-off scripts are not executed during hibernate or standby, or if a power-off is initiated from the Start menu or by a <CTRL-ALT-DEL>.
The –runalways and –runalwaysforsleep settings can be enabled independently of one another.
To run correctly, scripts must be saved in the NightWatchman scripts directory on the clients:
-
On Windows: %program files%\1E\Agent\NightWatchman\Scripts
-
On Mac: /Library/Application Support/1E/Scripts (at the root of the system disk.)
Writing NightWatchman power-off scripts
NightWatchman for Windows comes with pre-defined scripts that handle the following products and tools: Microsoft Outlook, Microsoft Word, Microsoft PowerPoint, Microsoft Excel, Microsoft Management Consoles (MMC), Internet Explorer, and Notepad. To handle other applications you can either contact 1E or write your own additional scripts using the details provided in Windows 1E NightWatchman Agent scripting reference.
Power off scripts language support
Sample scripts for Windows are provided for the following language variant versions of Microsoft Office:
-
Microsoft Office 2016, Office 365, Office 2013, Office 2010 and Office 2007 in English, French and German.
-
The default language is en-US. The 1E Agent attempts to detect the user or system preferred UI language set by the administrator in the Regional and Language Options control panel item. The 1E Agent assumes that the same language variant of the Microsoft Office has been installed and executes the scripts for that language on a power down action.
French and German scripts are stored in the following locations on the clients:
-
%program files%\1E\Agent\NightWatchman\Scripts\fr
-
%program files%\1E\Agent\NightWatchman\Scripts\de
The OS language in use defines which scripts are chosen, therefore it is expected that the Microsoft Office MUI matches the OS MUI. If this is not the case, then copy the correct set of Office scripts from the language folder into the user or system UI language folder.
For example, if installing onto a French OS with an English copy of Microsoft Office, the scripts from the English folder should be copied into the French folder.
NightWatchman can be configured from the command-line by administrators. This enables systems running NightWatchman across an enterprise to be configurable from a central location using any systems management tool that enables commands to be run on remote computers.
Please refer to 1E Agent Mac command-line switches for Macs.
Windows command-line syntax
On NightWatchman for Windows, all switches must be preceded by a dash and all values must be set using an equals sign:
nightwatchman.exe -<switch>=<value>
For example, to set the NightWatchman service to start automatically:
nwmsvc.exe -start=auto
The command-line examples assume that NightWatchman is placed on the Windows path or that the administrator has changed directory to the NightWatchman installation folder.
NightWatchman command-line switches
Refer to NightWatchman scripts.
Service switches
There is no equivalent service for the Mac; commands such as relicense are run from the nightwatchman executable.
Switch/option |
Notes |
---|---|
nwmsvc -relicense |
Licenses NightWatchman with the valid license key. |
nwmsvc -start |
Starts the NightWatchman service. |
nwmsvc -stop |
Stops the NightWatchman service. |
Executable information switches
You can use these to display information about the current version and settings.
Switch |
Notes |
---|---|
Displays the NightWatchman product version number. You will need the version number when contacting 1E support. |
|
Displays the current NightWatchman service configuration parameters on the command-line. |
|
Displays the current NightWatchman service configuration parameters on the command-line. |
|
Displays the command-line syntax help. |
System switches
Use these to control the core functionality of NightWatchman.
Switch |
Notes |
---|---|
countdowndlgtext |
Enables customization of a countdown message. |
countdownsecs |
Number of seconds that the countdown timer dialog is displayed before a power-off or log-off action is executed. |
hibernatenow |
Puts the computer into hibernate mode. Works in conjunction with countdownsecs and shutdownmsg. |
logoffaction |
Determines the behavior when a user is logged onto the system. In Active and Force mode, scripts are executed to close down applications gracefully. |
monitorjobs |
Turns the Configuration Manager job monitoring on or off. monitorjobs also controls the integration with WakeUp. If monitorjobs=ON, NightWatchm an p erforms auto power-off for machines awoken by a scheduled WakeUp signal. |
onceoff |
Determines whether the other switches on the NightWatchman command-line is applied in a once-off operation. |
pendingjobwindowmins |
Defines the power down behavior according to pending Configuration Manager jobs. |
retryattempts |
Number of times a power-off is attempted if cancelled by the user. |
retryinterval |
Interval (in minutes) the service retries the power-off if cancelled by the user or if the power-off cannot be performed. |
runalways |
Sets the behavior for running the RunAlways script during a NightWatchman initiated log-off, power-off or reboot. This script is run in the context of the logged-on user. |
runalwaysforsleep |
Behavior for running the RunAlways script during a NightWatchman initiated hibernate or standby. |
scheduledactions |
Configures scheduled power down actions at specific times for specified days of the week. |
scripttimeoutsecs |
Number of seconds NightWatchman waits before deciding a script has timed out. |
shutdownaction |
Use scheduledactions instead. |
Use scheduledactions instead. |
|
shutdownmsg |
Enables customization of a countdown message. |
shutdownnow |
Implements an immediate power-off, regardless of shutdownaction. |
shutdowntime |
Use scheduledactions instead. |
standbynow |
Puts the computer into standby mode. standbynow works in conjunction with countdownsecs and shutdownmsg. |
systemtray |
Controls the behavior of the system tray applet. |
useractivitymaxidlemins |
Duration (in minutes) for the window that governs the recent user activity test. |
Script control switches
Use these to control the behavior of NightWatchman scripts.
Switch |
Notes |
---|---|
prerun |
Enables a custom script to be run, prior to a NightWatchm an p ower-off, hibernate or standby event. |
runalways |
Behavior for running the RunAlways script during a NightWatchman initiated log-off, power-off or reboot. |
runalwaysforsleep |
Behavior for running the RunAlways script during a NightWatchman initiated hibernate or standby. |
runonresume |
Behavior for the RunOnResume script when the computer resumes from a low-power state. |
scripttimeoutsecs |
Number of seconds NightWatchman waits before deciding a script has timed out. |
Policy switches
Use these to set the communications between the 1E Agent and the Agility Framework server to retrieve its Power Policies from the NightWatchman Console.
Switch |
Notes |
---|---|
Sets the location of the NightWatchman Management Center policy service. |
|
Sets the polling interval, in minutes, to check for new Power Policy settings. |
|
Sets the retry interval, in minutes, to check for new power policy settings if the initial check fails. |
Power scheme switches
Use these switches to control the behavior of monitors, disks, sleep and hibernate functions.
Switch |
Notes |
---|---|
powerscheme |
Controls the setting of a NightWatchm an p ower scheme when the service starts and at user login. |
monitorac |
Switches the monitor to standby after a specified number of minutes of system idle time when the computer is running on mains power. |
monitordc |
Switches the monitor to standby after a specified number of minutes of system idle time when the computer is running on battery power. |
diskac |
Switches the hard disks to standby after a specified number of minutes of system idle time when the computer is running on mains power. |
diskdc |
Switches the hard disks to standby after a specified number of minutes of system idle time when the computer is running on battery power. |
standbyac |
Switches the computer to standby after a specified number of minutes of system idle time when the computer is running on mains power. |
standbydc |
Switches the computer to standby after a specified number of minutes of system idle time when the computer is running on battery power. |
hibernateac |
Switches the computer to hibernate after a specified number of minutes of system idle time when the computer is running on mains power. |
hibernatedc |
Switches the computer to hibernate after a specified number of minutes of system idle time when the computer is running on battery power. |
passwordonwakeup |
Determines if a password is required when the client computer resumes from standby or hibernate. |
Hardware utilization monitoring switches
Use these switches to control the monitoring of hardware utilization by the 1E Agent.
Switch |
Notes |
---|---|
Enables or disables the Hardware Utilization feature. |
|
Hardware utilization sample interval in seconds. |
|
Aggregation interval in minutes. |
Process exception switches
Use the following to control process exceptions. Before a scheduled NightWatchman event takes place, it checks to see if any of the the processes in the list are running and will abort the event if found, for details refer to Command-line switches.
Switch |
Notes |
---|---|
pelistshow |
Displays the process exception list. |
pelistadd |
Adds a process name to the process exception list. The name must match the name of the process as it appears in Task Manager. |
pelistdel |
Deletes a process from the process exception list. |
pelistfrom |
Replaces the process exceptions list with the contents of a named file. The named file must contain a list of process names, one on each line in the file. |
pelistclear |
Clears all process exceptions. |
Sleepless detection switches
Use these switches to control sleepless detection and its related exclusion list. Some processes may prevent computers from going into a sleep state. The exclusion list contains a list of processes that NightWatchman tells the computer to ignore when it attempts to enter a sleep state.
Switch |
Notes |
---|---|
Turns advanced sleepless detection mode on or off. |
|
Turns busy process detection on or off. |
|
Displays the sleepless exclusion list. |
|
Adds a process to the sleepless exceptions list. The process name must match the name as it appears in the NightWatchman Sleepless Client Detection/Busy and Sleepless Processes report. |
|
Deletes a process from the sleepless exclusion list. |
|
Replaces the sleepless exceptions list with the contents of a named file. The named file must contain a list of process names, one on each line in the file. |
|
Clears all sleepless exclusions. |
Alarm clock and maintenance window switches
Use these to control alarm clocks and maintenance windows.
Switch |
Notes |
---|---|
Sets an alarm clock schedule for specific days of the week. |
|
Determines if the display for a computer is turned on when an alarm clock wake up occurs. |
|
Maintenance schedule for specific days of the week. |
|
Determines if the display for a computer is turned on when a Maintenance Window wake up occurs. |
Policy and reporting switches
Use these switches for policy and reporting retrievals.
Switch |
Notes |
---|---|
When using HTTPS for communications and client certificate authentication, set this to the certificate issuer text. |
|
When using HTTPS for communications and client certificate authentication, set this to the certificate subject text. |
|
When using HTTPS for communications and client certificate authentication, set this to the certificate issuer text. |
|
When using HTTPS for communications and client certificate authentication, set this to the certificate subject text. |
|
Sets the URL of the NightWatchman Management Center policy service. |
|
Sets the status of NightWatchman reporting. |
|
Sets the URL for the NightWatchman Management Center Web Service reporting. |
|
Sets the URL for the secure NightWatchman Management Center policy service. |
|
Sets the URL for the secure NightWatchman Management Center Web Service reporting. |
Log file switches
Use these to set options for the log file.
Switch |
Notes |
---|---|
Level of debug information output to the NightWatchman log file. |
|
Location and name for the NightWatchman log file. |
|
Maximum size (in bytes) for the NightWatchman log file. |
Property |
Default value |
Notes |
|||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
Determines if the display for a computer is turned on when an alarm clock wake-up occurs. To turn monitors on when an alarm clock occurs: Copy
|
||||||||||||||||
ON |
Turns advanced sleepless detection mode on or off. See Sleepless detection for basic and advanced modes. Values are:
To turn advanced sleepless detection off: Copy
|
||||||||||||||||
|
Sets an alarm clock schedule for specific days of the week. On Windows, the format of the value is a list of entries separated by a vertical bar (|) where each entry is a day of operation and a time to wake up in the format: day(Hrs:Mins). The first entry in the list specifies whether to turn the monitor on during the alarm clock and uses the format: monitorstate=<state>, where state is on or off. The client computer is woken up 5 minutes before the specified time to ensure its availability at that time. For example, the following sets an alarm clock for 07:00 Monday and 08:00 Tuesday (the client computer will be awoken at 06:55 and 07:55 respectively): Copy
On the Mac, the format of the value is a list of entries separated by commas where each entry is a day of operation and a time to wake up, in the following format: day=Hrs:Mins. The client computer is woken up 5 minutes before the specified time to ensure its availability at that time. For example, the following sets an alarm clock for 07:00 Monday and 08:00 Tuesday (the client computer will be awoken at 06:55 and 07:55 respectively): Copy
|
||||||||||||||||
autorestart |
|
autorestart is deprecated as NightWatchman no longer supports non-APM/ACPI machines. |
|||||||||||||||
ON |
Disables busy process detection. busyprocessdetection is not applicable to Windows 7, Windows 8.1 or Windows 10.
To turn busy process detection on: Copy
|
||||||||||||||||
countdowndlgtext |
|
Customize a countdown message. The maximum length is 79 characters; if this is exceeded the default message is used. This message varies according to the shutdownaction currently set. Setting a value for coutdowndlgtext replaces all messages with a single custom message. |
|||||||||||||||
countdownsecs |
30 seconds |
Duration (in seconds) the countdown timer dialog is displayed before a power-off or log-off action is executed.
The countdown timer dialog will only appear if countdownsecs is not 0. To set a 5-minute countdown: Copy
|
|||||||||||||||
13 |
Sets the level of debug information output to the NightWatchman log file. You should only change this value after checking with the 1E support. |
||||||||||||||||
delaysecs |
30 seconds |
Sets the number of seconds before the countdown timer dialog is displayed before a power-off or log-off action is executed.
To set a 1 minute delay before the countdown starts: Copy
|
|||||||||||||||
diskac |
60 minutes |
Switches the hard disks to standby after a number of minutes of system idle time when the computer is running on mains power.
|
|||||||||||||||
diskdc |
5 minutes |
Switches the hard disks to standby after a number of minutes of system idle time when the computer is running on battery power.
|
|||||||||||||||
OFF |
Enables or disables hardware utilization monitoring. When enabled the 1E Agent will retrieve information from PCs to determine which ones are in use throughout the day. Values are:
|
||||||||||||||||
600 |
Hardware utilization sample interval (in seconds).
|
||||||||||||||||
60 |
The aggregation interval (in minutes).
|
||||||||||||||||
|
Displays the command-line syntax help. |
||||||||||||||||
hibernateac |
0 |
Switches the computer to hibernate after a number of minutes of system idle time when the computer is running on mains power.
|
|||||||||||||||
hibernatedc |
0 |
Switches the computer to hibernate after a number of minutes of system idle time when the computer is running on battery power.
|
|||||||||||||||
hibernatenow |
|
Puts the computer into hibernate mode. Works in conjunction with countdownsecs and shutdownmsg. Any other switches on the same command-line aborts the hibernate operation and reports an error. |
|||||||||||||||
httpserver |
|
Server name hosting the NightWatchman Management Center standard security websites used for policy retrieval and reporting. This can be set to the server name or IP address and may also refer to the port number if this has been changed from the default on the server side. For example, to set the server name to nwmcserver: Copy
To use an IP address of 192.168.23.23: Copy
To use nwmcserver as the server using port 180: Copy
|
|||||||||||||||
httpsserver |
|
Server name hosting the NightWatchman Management Center secure websites used for policy retrieval and reporting. This can be set to the server name and may also refer to the port number if this has been changed from the default on the server side. You cannot use the IP address for the secure server definition. To set the server name to nwmcserver: Copy
To set the server name to nwmcserver using port 180: Copy
|
|||||||||||||||
ignoreerrors |
OFF |
Behavior on detecting errors in the power-off scripts during a scheduled event.
|
|||||||||||||||
ignorescripterrors |
OFF |
Behavior on detecting errors in the power-off scripts during a scheduled event.
|
|||||||||||||||
C:\ProgramData\ 1E\Agent\nightwatchman.log |
Location and name for the NightWatchman log file. For example, to set the log file called NW.LOG in C:TEMP: Copy
|
||||||||||||||||
logoffaction |
Active |
Determines the behavior when a user is logged onto the system. In ACTIVE and FORCE mode, scripts are executed to close down applications gracefully. This switch is now provided for legacy support only. Use scheduledactions instead.
|
|||||||||||||||
macspoolerdirectory |
/Library/ApplicationSupport/ 1E/NightWatchman/Messages |
Location for the Mac spooler directory, where reporting messages are stored before being sent to the NightWatchman Management Center Web Service. macspoolerdirectory, set by the installer, modifies the settings for communicating with the NightWatchman Management Center Reporting and should not need to be modified under normal circumstances. |
|||||||||||||||
|
Maintenance schedule for specific days of the week. The format of the value is a list of entries separated by a vertical bar |. The first entry in the list determines if the on/off state of the monitor during the maintenance window and uses the format: Copy
where <state> is on or off. The remaining entries determine the day of operation, a time to wake up, a duration and an action to perform at the end, in the following format: day(Hrs:Mins,Duration,EndAction) The Hrs:Mins time parameter must always be in the format hh:mm. So to represent 3am the string is 03:00. The client computer is woken up to 5 minutes before the specified time to ensure its availability. EndAction may take one of values:
For example, to set a 23-minute maintenance window on Mondays leaving the computer on, and a 1-hour maintenance window on Tuesdays leaving the computer on standby: Copy
|
||||||||||||||||
|
Interval (in seconds) to wait before batch dispatching messages in the spooler to the NightWatchman Management Center Web Service. This switch takes precedence over minmessagesperbatch. maxbatchsendintervalsecs, set by the installer, modifies the settings for communicating with the NightWatchman Management Center Reporting and should not need to be modified under normal circumstances.
|
||||||||||||||||
604800 (7 days) |
Duration (in seconds) the 1E Agent will store reporting information locally when the NightWatchman Management Center Web service cannot be contacted. Data held beyond the default value is deleted.maximumfileagesecs, set by the installer, need not be modified under normal circumstances. |
||||||||||||||||
1048578 bytes |
Maximum size (in bytes) for the NightWatchman log file. If the log file exceeds this value NightWatchman saves the current log file to a file in the same location but with the extension .LO_, overwriting any existing copy. NightWatchman will continue to write to the file specified in logfilename.
For example, to set a 32K limit for the log file: Copy
|
||||||||||||||||
|
Minimum number of messages in the spooler before a batch is dispatched to the NightWatchman Management Center Web Service. It is subservient to maxbatchsendintervalsecs in terms of setting how long between sending messages to the NightWatchman Management Center Web Service. minmessagesperbatch, set by the installer, modifies the settings for communicating with NightWatchman Management Center Reporting and should not need to be modified under normal circumstances. |
||||||||||||||||
monitorac |
15 minutes |
Switches the monitor to standby after a specified number of minutes of system idle time when the computer is running on mains power.
|
|||||||||||||||
monitordc |
3 minutes |
Switches the monitor to standby after a specified number of minutes of system idle time when the computer is running on battery power.
|
|||||||||||||||
monitorjobs |
ON |
Enables or disables the Configuration Manager job monitoring. monitorjobs also controls the integration with WakeUp. If monitorjobs=ON, NightWatchman performs auto power-off for machines awoken by a scheduled WakeUp signal. Values are:
|
|||||||||||||||
|
Determines if the display for a computer is turned on when a maintenance window wake up occurs. For example, to turn a monitor on when a maintenance window wake up occurs: Copy
|
||||||||||||||||
onceoff |
|
Replaces shutdownonce. Determines whether the other switches on the NightWatchman command-line is applied in a once-off operation. Any other switches used in conjunction with the onceoff command will not affect other global scheduled settings. It can be used in conjunction with countdownsecs, logoffaction, shutdownaction, shutdownmsg and shutdowntime. onceoff cannot be scheduled to start within 5 minutes of a maintenance window. onceoff only retries on the day of the power-off. If the day expires before retryattempts, no more retries are attempted. If you do not want users to cancel the event, use -logoffaction=force. For example, to force a power-off at 7:30 pm: Copy
|
|||||||||||||||
passwordonwakeup |
ON |
Determines if a password is required when the client computer resumes from standby or hibernate.Values are:
For example, to set the client computer not to request a password on resumption: Copy
|
|||||||||||||||
|
Adds a process name to the process exception list.The name must match the name of the process as it appears in Task Manager. For example, to set NightWatchman to abort power-offs when the Notepad application is running: Copy
|
||||||||||||||||
pelistclear |
|
Clears all process exceptions. |
|||||||||||||||
|
Deletes a process from the process exception list. For example, to remove the Notepad application process from the process exception list: Copy
|
||||||||||||||||
|
Replaces the process exceptions list with the contents of a named file. The named file must contain a list of process names, one on each line in the file. Clears any existing items in the process exceptions list before adding the new items from the file. For example, to list the contents of a process exception list from a file named myprocesses.txt: Copy
|
||||||||||||||||
pelistshow |
|
Displays the process exception list. |
|||||||||||||||
5 |
Defines the power down behavior according pending Configuration Manager jobs. It takes an integer that defines the number of minutes in the look-ahead window. monitorjobs =ON must be set (as it is by default) in order for this value to be used. The way that the power-off behavior is modified is dependent on the shutdown type:
When PENDINGJOBWINDOWMINS=0 but the MONITORJOBS=ON, the look-ahead functionality is turned off but the check for running Configuration Manager jobs will still happen. To turn off Configuration Manager job monitoring altogether set MONITORJOBS=OFF. This behavior is dependent on checking the list of pending Configuration Manager jobs. If the client is not installed on the local computer, power down will proceed as normal regardless of the setting of the switch |
||||||||||||||||
|
If using HTTPS for communications and client certificate authentication, set this to the certificate issuer text. This must be set to the same value as reportingcertissuer. |
||||||||||||||||
|
If using HTTPS for communications and client certificate authentication, set this to the certificate subject text. This must be set to the same value as reportingcertsubject. |
||||||||||||||||
|
URL of the NightWatchman Management Center policy service in the format: http://<server>/AFWebService/PolicyService.asmx where <server> is the location of your server. This value is set during installation and will not require modification during normal use. For example, to set your NightWatchman Management Center Web Service server to AFServer: Copy
|
||||||||||||||||
|
Polling interval (in minutes) to check for new power policy settings. This poll checks to see which power policy is used for the client computer and retrieves its settings. Power policies and their associated computers are defined using the NightWatchman Console.
Power policies held in the NightWatchman Management Center will set this value if applied to the 1E Agent. Default values in the NightWatchman Management Center are dependent on the Environment setup (selected in the NightWatchman Management Center installer). These are:
|
||||||||||||||||
600 |
Interval (in seconds) for the delay in resending rejected messages to the NightWatchman Management Center Web Service Component. pollintervalsecs, set by the installer, modifies the settings for communicating with NightWatchman Management Center Reporting and should not need to be modified under normal circumstances. |
||||||||||||||||
|
Retry interval (in minutes) to check for new power policy settings if the initial check fails.
|
||||||||||||||||
powerscheme |
OFF |
Controls the setting of a NightWatchman power scheme when the service starts and at user login. The logged in user requires permissions to be able to change their local power scheme.
|
|||||||||||||||
|
Enables a custom script to be run, prior to a NightWatchman power-off, hibernate or standby event. This script is set to run before all other actions. At the start of any scheduled event and depending on the status of the -prerun option, NightWatchman runs this script to have control over whether the scheduled event continues.
During a NightWatchman installation, a default PreRun script is created that explicitly performs no action and only returns a success code. The script is commented to enable the functionality to be customized easily.
|
||||||||||||||||
rebootnow |
|
Reboots the computer. rebootnow works in conjunction with countdownsecs and shutdownmsg. Any other switches on the same command-line will abort the reboot operation and report an error. |
|||||||||||||||
|
Licenses NightWatchman with the valid license key. If no license key was entered during the initial NightWatchman installation, a 30-day evaluation license would have been put in place. If the license key has already expired the service will have stopped. You will need to restart the service manually after relicensing with: Copy
For example, to relicense NightWatchman for Windows with a new licence key (ABCDE-1234-3456-5678-5678): Copy
To relicense NightWatchman for Macs with a new licence key (ABCDE-1234-3456-5678-5678): Copy
|
||||||||||||||||
|
Status of NightWatchman reporting. If reporting=ON, NightWatchman sends regular messages to the NightWatchman Management Center Web Service defined by reportingserverurl. Switch category: Policy and reporting
|
||||||||||||||||
|
If using HTTPS for communications and client certificate authentication, set this to the certificate issuer text. This must be set to the same value as policycertissuer. |
||||||||||||||||
|
If using HTTPS for communications and client certificate authentication, set this to the certificate subject text. This must be set to the same value as policycertsubject . |
||||||||||||||||
reportingserver |
|
This switch is replaced by reportingserverurl . |
|||||||||||||||
|
Replaces reportingserver. Sets the URL for the NightWatchman Management Center Web Service reporting in the format: nightwatchman -reportingserverurl= http://RServ/AFWebService/PostMessage.aspx where <server> is the location of the NightWatchman Management Center Web Service Component. This value is set during installation and will not require modification during normal use. For example, to set your NightWatchman Web Service server to RServ: Copy
|
||||||||||||||||
retryattempts |
3 |
Number of times a power-off is attempted if cancelled by the user
For example, to set NightWatchman to try and shutdown 10 time after the user cancels the event: Copy
|
|||||||||||||||
60 |
Interval (in minutes) the service retries the power-off if cancelled by the user or if the power-off cannot be performed.
For example, to set NightWatchman to retry every 15 minutes: Copy
|
||||||||||||||||
OFF |
Behavior for running the RunAlways script during a NightWatchman initiated log-off, power-off or reboot. This script is run in the context of the logged-on user. On Windows, the script is called RUNALWAYS.vbs and on the Mac, it is called RunAlways.scpt
|
||||||||||||||||
OFF |
Behavior for running the RunAlways script during a NightWatchman initiated hibernate or standby. Note On Windows, the script is called RUNALWAYS.vbs and on the Mac, it is called RunAlways.scpt
|
||||||||||||||||
OFF |
Behavior for the RunOnResume script when the computer resumes from a low-power state. On Windows the script is called RUNONRESUME.vbs, on the Mac it is called RunOnResume.scpt.
|
||||||||||||||||
runonresumedelaysecs |
20 |
Delay (in seconds) between the resume event and when the RunOnResume script is run.
|
|||||||||||||||
runscriptseverylogoff |
|
This switch is no longer supported. |
|||||||||||||||
|
Configures scheduled power down actions at specific times for specified days of the week. The syntax for Windows is D{,D,D}(T,P,L){| D{,D,D}(T,P,L)} and for Macs D{,D,D}=T,P,L { D{,D,D}=T,P,L} where
All the above values are case insensitive For example, t o set a power down on Windows at 18:00 with a logoffaction=FORCE for every day of the week: Copy
To set a power down on Mac at 18:00 with a logoffaction=FORCE for every day of the week: Copy
|
||||||||||||||||
scripttimeoutsecs |
30 |
Duration (in seconds) NightWatchman waits before deciding a script has timed out.
If the value for scripttimeoutsecs is set too low, you could be at risk of data loss as the scripts may not have time to finish and NightWatchman may poweroff without some open files having been saved. |
|||||||||||||||
|
URL for the secure NightWatchman Management Center policy service in the format https://<server>/AFWebService/PolicyService.asmx where <server> is the location of your server. This value is set during installation and will not require modification during normal use. If you do need to change this, you must set the full URL. For example, to set your NightWatchman Management Center Web Service server to AFServer: Copy
|
||||||||||||||||
|
URL for the secure NightWatchman Management Center Web Service reporting in the format: https://<server>/AFWebService/PostMessage.aspx where <server> is the name of your NightWatchman Management Center Web Service component. securereportingserverurl, set by the installer, modifies the settings for communicating with the NightWatchman Management Center and should not need to be modified under normal circumstances. For example, to set your NightWatchman Web Service server to RServ: Copy
|
||||||||||||||||
|
Adds a process to the sleepless exceptions list. The process name must match the name as it appears in the NightWatchman Sleepless Client Detection/Busy and Sleepless Processes report. Normally, the name matches the Task Manager process but for running services that are hosted by SvcHost, SvcHost.exe will be reported back. You will only get the detail of the service name if advanced sleepless client detection is turned on. For example, to set NightWatchman to sleep even if the LanManServer service prevents this from taking place: Copy
|
||||||||||||||||
|
Clears all sleepless exclusions. |
||||||||||||||||
|
Deletes a process from the sleepless exclusion list. For example, to remove the Notepad process from the sleepless exclusion list: Copy
|
||||||||||||||||
|
Replaces the sleepless exceptions list with the contents of a named file. The named file must contain a list of process names, one on each line in the file. Clears any existing items in the sleepless exclusions list before adding the new items from the file. For example, to list the contents of a sleepless exception list from a file named myprocesses.txt Copy
|
||||||||||||||||
|
Displays the sleepless exclusion list. |
||||||||||||||||
|
Displays the current NightWatchman service configuration parameters on the command-line. This switch is now identical to the -summary switch. |
||||||||||||||||
Normal |
Determines the shutdown type. This switch is now provided for legacy support only, use scheduledactions instead.
|
||||||||||||||||
shutdowndays |
All days |
shutdowndays is now provided for legacy support only on Windows, use scheduledactions instead. It is no longer supported on the Mac, use scheduledactions instead. Sets the days of operation as a range or a set of integers.
After a default installation NightWatchman is set to operate 7 days a week. For example, to set a range from Monday to Friday: Copy
To set a shutdown for Monday,Tuesday and Thursday only: Copy
|
|||||||||||||||
shutdownmsg |
|
Customize a countdown message. The maximum length is 79 characters; if this is exceeded the default message is used. This message varies according to the shutdownaction currently set. Setting a value for coutdowndlgtext replaces all messages with a single custom message. This message only appears if countdownsecs is not equal to 0. To customize a countdown message with the text 'Let's save some energy!': Copy
|
|||||||||||||||
shutdownnow |
|
Implements an immediate power-off, regardless of shutdownaction, depending on the value of the countdownsecs, shutdownmsg and logoffaction switches. If there are any other switches on the same command-line, the power-off aborts and reports an error. shutdownnow only applies to the current operation and will not affect global settings. It disables retryattempts and retryinterval. If useractivitymaxidlemins is set to anything other than 0, shutdownnow on its own will not work when run from a local command-line. Adding -logoffaction=force allows the power-off to work, as will initiating power-off from the NightWatchman system tray menu. To force a power-off: Copy
If logoffaction=passive, no action takes place. If a computer is already in standby or hibernate mode, it will not be woken to shut it down. |
|||||||||||||||
shutdownonce |
|
shutdownonce is no longer supported. See onceoff for approximately equivalent behavior. |
|||||||||||||||
shutdowntime |
|
shutdowntime is now provided for legacy support only on Windows, you should use scheduledactions instead. It is no longer supported on the Mac, use scheduledactions instead. Sets the time for the scheduled event. shutdowntime utilizes the scheduler and it takes the current shutdowndays settings into account and only initializes a scheduled event on days that are set.
|
|||||||||||||||
spoolerdirectory |
C:\ProgramData\ 1E\Reporting\NightWatchman\ |
Location of the spooler directory where NightWatchman Management Center Reporting messages are stored before being sent to the NightWatchman Management Center Web Service. spoolerdirectory, set by the installer, modifies the settings for communicating with the NightWatchman Management Center Reporting and should not need to be modified under normal circumstances. |
|||||||||||||||
standbyac |
60 |
Switches the computer to standby after a number of minutes of system idle time when the computer is running on mains power.
|
|||||||||||||||
standbydc |
5 |
Switches the computer to standby after a number of minutes of system idle time when the computer is running on battery power.
|
|||||||||||||||
standbynow |
|
Puts the computer into standby mode. standbynow works in conjunction with countdownsecs and shutdownmsg. If there are any other switches on the same command-line, the power-off aborts and reports an error. standbynow only applies to the current operation and will not affect global settings. |
|||||||||||||||
|
Starts the NightWatchman service. Values are:
For example, to start the service: Copy
To set the service to auto start: Copy
|
||||||||||||||||
|
Stops the NightWatchman service, for example: Copy
|
||||||||||||||||
|
Displays the current NightWatchman service configuration parameters on the command-line. summary is identical to settings . |
||||||||||||||||
systemtray |
|
Behavior of the system tray applet. SYSTEMTRAY=OFFis only supported for use in situations where backup documents do not exist. When this option is used and backup documents exist, the system tray icon will appear anyway but the related menu items will be disabled. SYSTEMTRAY=OFF could be used, for example, if NightWatchman were to be configured for a period of reporting only, then the system tray icon could be hidden so as not to distract users.
|
|||||||||||||||
useractivitymaxidlemins |
0 |
Duration (in minutes) for the window that governs the recent user activity test. If users have been active during a determined period prior to a NightWatchman scheduled event, the event is postponed.
We recommended setting this to a value less than retryintervalmins . The postponement time is governed by the NightWatchman retryinterval switch setting. useractivitymaxidlemins does not affect shutdowns started from the system tray or those where the NightWatchman logoffaction=Force. To set the user activity window to 20 minutes: Copy
|
|||||||||||||||
|
Displays the NightWatchman product version number. You will need the version number when contacting 1E support. |
||||||||||||||||
1440 |
Duration (in minutes) to wait before the spooler retrys connecting to the NightWatchman Management Center Web Service. waitminutesforunavailableserver set by the installer, modifies the settings for communicating with NightWatchman Management Center Reporting and should not need to be modified under normal circumstances. |
You can set global policies for NightWatchman using Active Directory Group Policy. A sample template (1Enwm.adm) is provided in the NightWatchman Management Center zip file. This is a standard Group Policy template and is fully editable. Support is provided on a reasonable endeavors basis.
Settings configured using Group Policy takes precedence over configuration options set at installation time.
The NightWatchman template can be imported for a particular domain. To do this:
-
In the Active Directory Users and Computers console, right-click the domain.
-
Select Properties from the context menu.
-
In the Properties dialog, select the Group Policy tab.
-
In the Group Policy tab, click New to add a new group policy.
-
Create a new group policy called NightWatchman.
-
Click Edit.
-
In the Group Policy Object Editor, right-click the Administrative Templates node.
-
From the context menu, select Add/Remove Templates...
-
In the Add/Remove Templates dialog, click Add...
-
Locate the 1Enwm.adm file (typically located under C:\Windows\Inf).
-
Click Open.
-
The NightWatchman group policy settings is imported into the Group Policy object and a new node (1E Software) is created under Administrative Templates. This new node contains all the settings that control NightWatchman.
The 1E Agent Mac provides NightWatchman functionality on Apple Mac devices.
For details of how to install the 1E Agent Mac, please refer to Installing the Mac 1E Agent page.
Mac command-line syntax
You can use the NightWatchman command line tool to configure general parameters, to initiate an immediate shutdown, standby or hibernate; or to configure a "once-off" shutdown, standby or hibernate.
The syntax depends on whether you are configuring settings, or issuing commands.
Use ./nightwatchman -help to see about all the switches available.
All switches must be preceded by a -s followed by the name of the switch and its value, separated by spaces:
sudo ./nightwatchman -s < switch > <value>
For example, to set NightWatchman countdown seconds to 120:
sudo ./nightwatchman -s countdownsecs
Commands consist of the switch preceded by a dash. For example,to put a Mac into sleep mode:
sudo ./nightwatchman -standbynow
Specific switches that set parameters not contained in the settings file have the same syntax as commands but are followed a space and their values. For example, to set an alarm clock for Monday and Tuesday at 6am and 7am respectively:
sudo ./nightwatchman -alarmclock mon= 06 : 00 , tue= 07 : 00
Switches that set parameters using the this format are:
All other switches that set values use the -s format.
Use a space to separate switches in a command-line if you're using more than one switch. For example, to set a countdown time to 120 seconds, display "Time to sleep" in the countdown dialog and put the Mac into sleep mode:
sudo ./nightwatchman -standbynow -s countdownsecs 120 -s countdowndlgtext "Time to sleep"
Mac command reference
Miscellaneous commands
Command |
Description |
---|---|
-g |
Displays the current NightWatchman settings. |
-s <SETTINGNAME> <SETTINGVALUE> |
Sets the named setting to the specified value. |
-version |
Displays the installed version of NightWatchman. |
Logging
Command |
Description |
---|---|
-debug N |
Sets the level of debug information output to the NightWatchman log files. The default value is 0. The supported values are: 0 = "critical" logging, which means only essential messages are logged, such as errors, failures and a few important informational messages. 1 = "debug" logging, which logs messages regarding the steps taken, and settings used, by the software. 2 = "maximum" logging, which logs all messages, including some that occur too frequently to be useful in normal situations. |
Action/Once-Off Commands
Command |
Description |
---|---|
-shutdownnow |
Schedules an immediate shutdown. The command accepts the optional parameters LogOffAction, CountdownSecs and CountdownDlgText. |
-rebootnow |
Schedules an immediate reboot (restart). The command accepts the optional parameters LogOffAction, CountdownSecs and CountdownDlgText. |
-hibernatenow |
Schedules an immediate hibernate (suspend). The command accepts the optional parameters CountdownSecs and CountdownDlgText. |
-standbynow |
Schedules an immediate standby (sleep). The command accepts the optional parameters CountdownSecs and CountdownDlgText. |
-onceoff |
Sets parameters for a "once-off" shutdown, log-off, hibernate, standby, etc.
The command requires the ShutdownTime parameter, and accepts the optional parameters ShutdownDate, ShutdownAction, LogOffAction, CountdownSecs and CountdownDlgText. |
General Settings
Command |
Description |
---|---|
-s CountdownSecs NN |
Sets the number of seconds that the countdown timer dialog box will be displayed before the shutdown or log-off action is executed. The minimum value is 0 seconds. The maximum value is 3600 seconds (1 hour). |
-s LogOffAction Passive|Active|Force |
Determines the behavior when a user is logged onto the system. Can be set to one of Passive, Active or Force. |
-s RetryAttempts NN |
Sets the number of times that a power down will be attempted if cancelled by the user. The minimum value is 0 retries. The maximum value is 1440 retries. The default value is 3 retries. |
-s RetryInterval MINS |
Sets the interval (in minutes) at which the service will retry a power down if cancelled by the user or if a power down cannot be performed. The minimum value is 1 minute. The maximum value is 60 minutes. The default value is 60 minutes. |
-s ShutdownAction Hibernate|Logoff|Normal|PowerOff|Reboot|Standby |
Determines the power down method. Can be set to one of Hibernate, Logoff, Normal, PowerOff, Reboot or Standby. |
-s CountdownDlgText MESSAGE |
Customize the NightWatchman power down message. For example: NightWatchman -s CountdownDlgText "Shutting down for scheduled maintenance" |
Script Behavior Settings
Command |
Description |
---|---|
-s IgnoreScriptErrors ON|OFF |
Sets the behavior on encountering errors in the power down scripts. When set to OFF (the default), any errors in the power down scripts will prevent the power down from taking place. When set to ON, any errors in the power down scripts will be ignored and the power down will be allowed to continue. |
-s RunAlways ON|OFF |
When set to ON, every power down action (except for sleep and hibernate) will run the RunAlways scripts after any other scripts have run. |
-s RunAlwaysOnSleep ON|OFF |
When set to ON, every sleep or hibernate power down action will run the RunAlwaysOnSleep scripts after any other scripts have any run. |
-s RunAlwaysOnResume ON|OFF |
When set to ON, the RunAlwaysOnResume scripts will be run after the system wakes up from a sleep or hibernate power down action. |
-s RunAlwaysOnResumeDelaySecs SECS |
Controls the number of seconds that NightWatchman will wait before starting the RunAlwaysOnResume scripts. The minimum value is 0. The maximum value is 300 (5 minutes). The default value is 30 seconds |
-s ScriptTimeoutSecs SECS |
Controls how many seconds NightWatchman will wait before it decides that a script has timed out. The minimum value is 1. The maximum value is 120 (2 minutes). The default value is 10 seconds. |
Power Profile Settings
Command |
Description |
---|---|
-s PowerScheme ON|OFF |
Controls whether NightWatchman will attempt to enforce a power scheme. Can be set to one of the following values: ON: The NightWatchman power scheme will be applied when the service starts and when a user logs in. OFF: The power scheme will not be applied. (Default) |
-s DiskAC MINS |
Set the hard disks to switch to standby after a specified number of minutes of system idle time when the computer is running on mains power. A value of zero turns this power management option off. The default value is 10. |
-s DiskDC MINS |
Set the hard disks to switch to standby after a specified number of minutes of system idle time when the computer is running on battery power. A value of zero turns this power management option off. The default value is 10. |
-s HibernateAC MINS |
Set the computer to hibernate after a specified number of minutes of system idle time when the computer is running on mains power. A value of zero turns this power management option off. The default value is 0. |
-s HibernateDC MINS |
Set the computer to hibernate after a specified number of minutes of system idle time when the computer is running on battery power. A value of zero turns this power management option off. The default value is 10. |
-s MonitorAC MINS |
Set the monitor to switch to standby after a specified number of minutes of system idle time when the computer is running on mains power. A value of zero turns this power management option off. The default value is 10. |
-s MonitorDC MINS |
Set the monitor to switch to standby after a specified number of minutes of system idle time when the computer is running on battery power. A value of zero turns this power management option off. The default value is 2. |
-s StandbyAC MINS |
Set the computer to switch to standby after a specified number of minutes of system idle time when the computer is running on mains power. A value of zero turns this power management option off. The default value is 10. |
-s StandbyDC MINS |
Set the computer to switch to standby after a specified number of minutes of system idle time when the computer is running on battery power. A value of zero turns this power management option off. The default value is 10. |
-s PasswordOnWakeup ON|OFF |
Sets whether a password logon is required when the system resumes from standby or hibernate. |
Example:
NightWatchman -s DiskAC 60 DiskDC 5 HibernateAC 0 HibernateDC 0 MonitorAC 15 MonitorDC 3 StandbyAC 60 StandbyDC 5
Changes the values of the NightWatchman power scheme. Values are given in minutes.
Reporting Settings
Command |
Description |
---|---|
-s Reporting ON|OFF |
Turns NightWatchman reporting on or off. |
-s MaxBatchSendIntervalSecs SECS |
Sets the maximum interval to wait before batch dispatching messages in the spooler to the reporting server. |
-s MaximumFileAgeSecs SECS |
Sets the maximum age of a reporting file. Beyond this value, the file will not be submitted to the reporting server and will instead be deleted. |
-s MinMessagesPerBatch NN |
Sets the minimum number of messages in the spooler before a batch is dispatched to the reporting server. |
-s PollIntervalSecs SECS |
Sets the number of seconds to wait before the spooler will check for new reporting messages. |
-s MacSpoolerDirectory DIRECTORYPATH |
Sets the location to which reporting messages are spooled before being sent to the reporting server. |
-s WaitMinutesForUnavailableServer MINS |
Sets the number of minutes to wait before the spooler will retry connecting to the reporting server. |
Alarm Clock Command
-alarmclock sun=23:59,mon=23:59,wed=23:59,sat=23:59
Sets up an alarm clock schedule for any day of the week that will allow the machine to be woken up at the specified time.
Maintenance Window Command
-maintenancewnd sun=23:59,23,0 mon=11:00,25,1
Sets up a maintenance window schedule for any day of the week to prevent the machine from being shut down by NightWatchman during that period.
Scheduled Actions Command
-scheduledactions DAY{,DAY,DAY,..,}=TIME,SHUTDOWNACTION,LOGOFFACTION {..,}
Sets up a schedule action for any day of the week to schedule a powerdown event in the machine by NightWatchman during that period.
DAY can be one of the weekday from {sun, mon, tue, wed, thu, fri, sat} or ALLDAYS which indicates all days in week, WEEKDAYS indicating (mon-fri) and WEEKEND indicating (sat, sun)
TIME has to be hh:mm format
SHUTDOWNACTION can be set to one of { PowerOff, Normal, Logoff, Standby, Hibernate, Reboot }
LOGOFFACTION can be set to one of { Passive, Active, Force }
Example:
-scheduledactions fri,sat=15:37,standby,passive mon,weekdays=22:00,reboot,force weekend=12:00,logoff,active
Process Exception List Commands
Command |
Description |
---|---|
-pelistfrom FILEPATH |
Clears and adds a list of process names into the process exception list from a file. |
-pelistclear |
Clears the process exception list. |
-pelistadd PROCESSNAME |
Adds the name of a single process to the process exception list. |
-pelistdel PROCESSNAME |
Removes the name of a single process from the process exception list. |
-pelistshow |
Displays the process exception list. |
Power Policy Settings
Command |
Description |
---|---|
-pelistfrom FILEPATH |
Clears and adds a list of process names into the process exception list from a file. |
-pelistclear |
Clears the process exception list. |
-s PollIntervalMins MINS |
Sets the polling interval to check for new power policy check in minutes. This is a number between 1 and 43200. |
-s PollRetryIntervalMins MINS |
Sets the initial retry interval to check for new power after failure. policy check in minutes. This is a number between 1 and 1440. |
Server Settings
Command |
Description |
---|---|
-s HTTPServer server |
Specifies the domain name or address of the HTTP server used for reporting and policy retrieval. This value can be suffixed with a custom port number. eg. server:80 |
-s HTTPSServer server |
Specifies the domain name or address of the secure HTTPS server used for reporting and policy retrieval. This value can be suffixed with a custom port number. eg. server:443 |
Miscellaneous Settings
Command |
Description |
---|---|
-s PreRun true|false |
Enables the running of a custom script prior to NightWatchman commencing the power down process. |
-s SystemTray OFF|ON|ON1 |
Controls the display of the status menu icon. The default value is ON. The ON1 setting enables the status menu icon, but disables the "Keep Active" menu item. |
-s UserActivityMaxIdleMins MINS |
Controls the length of the window (in minutes) within which a user must have been active if the power down is to be automatically postponed (ie. will not show a power down message but automatically postpone the power down). This setting does not affect power downs started from the status menu or those with LogOffAction Force. The minimum value is 0. The maximum value is 1440 (24 hours). The default value is 0, which disables the feature. |