Skip to main content

NightWatchman Enterprise 7.3

NightWatchman command-line switches

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

Note

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
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

version

Displays the NightWatchman product version number. You will need the version number when contacting 1E support.

settings

Displays the current NightWatchman service configuration parameters on the command-line.

summary

Displays the current NightWatchman service configuration parameters on the command-line.

help

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.

shutdowndays

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

policyserverurl

Sets the location of the NightWatchman Management Center policy service.

pollintervalmins

Sets the polling interval, in minutes, to check for new Power Policy settings.

pollretryintervalmins

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

hardwareutilization

Enables or disables the Hardware Utilization feature.

hardwareutilizationsampleinterval

Hardware utilization sample interval in seconds.

hardwareutilizationaggregationinterval

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

advancedsleeplessdetection

Turns advanced sleepless detection mode on or off.

busyprocessdetection

Turns busy process detection on or off.

selistshow

Displays the sleepless exclusion list.

selistadd

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.

selistdel

Deletes a process from the sleepless exclusion list.

selistfrom

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.

selistclear

Clears all sleepless exclusions.

Alarm clock and maintenance window switches

Use these to control alarm clocks and maintenance windows.

Switch

Notes

alarmclock

Sets an alarm clock schedule for specific days of the week.

acturnonmonitor

Determines if the display for a computer is turned on when an alarm clock wake up occurs.

maintenancewnd

Maintenance schedule for specific days of the week.

mwturnonmonitor

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

policycertissuer

When using HTTPS for communications and client certificate authentication, set this to the certificate issuer text.

policycertsubject

When using HTTPS for communications and client certificate authentication, set this to the certificate subject text.

reportingcertissuer

When using HTTPS for communications and client certificate authentication, set this to the certificate issuer text.

reportingcertsubject

When using HTTPS for communications and client certificate authentication, set this to the certificate subject text.

policyserverurl

Sets the URL of the NightWatchman Management Center policy service.

reporting

Sets the status of NightWatchman reporting.

reportingserverurl

Sets the URL for the NightWatchman Management Center Web Service reporting.

securepolicyserverurl

Sets the URL for the secure NightWatchman Management Center policy service.

securereportingserverurl

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

debug

Level of debug information output to the NightWatchman log file.

logfilename

Location and name for the NightWatchman log file.

maxlogfilesize

Maximum size (in bytes) for the NightWatchman log file.

Command-line switches

Property

Default value

Notes

acturnonmonitor

230733684.png

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:

nightwatchman 
-acturnonmonitor=on

advancedsleeplessdetection

230733684.png

ON

Turns advanced sleepless detection mode on or off. See Sleepless detection for basic and advanced modes. Values are:

  • ON

  • OFF

To turn advanced sleepless detection off:

nightwatchman 
-advancedsleeplessdetection=off
alarmclock
230733684.png
230733683.png

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):

nightwatchman 
-alarmclock="monitorstate=off|
mon(07:00)|tue(08:00)"

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):

nightwatchman 
-alarmclock mon=07:00, tue=08:00

autorestart

230733684.png

autorestart is deprecated as NightWatchman no longer supports non-APM/ACPI machines.

busyprocessdetection

230733684.png

ON

Disables busy process detection.

Note

busyprocessdetection is not applicable to Windows 7, Windows 8.1 or Windows 10.

  • ON – busy processes that keep the computer awake are reported centrally but will still prevent the computer from going to sleep. The contents of the report contain the names for the busy processes. If these are included in the sleepless exclusion list, they will not be allowed to stop the computer from going to sleep after a period of inactivity.

  • OFF – ensures that busy processes on Windows Vista will not prevent a computer from sleeping, thereby reproducing the standard Windows 7, Windows 8.1 or Windows 10 behavior

To turn busy process detection on:

nightwatchman 
-busyprocesssdetection=on

countdowndlgtext

230733683.png

Customize a countdown message.

Note

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

230733684.png
230733683.png

30 seconds

Duration (in seconds) the countdown timer dialog is displayed before a power-off or log-off action is executed.

  • Must be between 0 and 3600 inclusive

The countdown timer dialog will only appear if countdownsecs is not 0. To set a 5-minute countdown:

nightwatchman 
-countdownsecs=300
debug
230733684.png
230733683.png

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

230733684.png
230733683.png

30 seconds

Sets the number of seconds before the countdown timer dialog is displayed before a power-off or log-off action is executed.

  • Must be between 30 and 300 inclusive

To set a 1 minute delay before the countdown starts:

nightwatchman 
-delaysecs=60

diskac

230733684.png
230733683.png

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.

  • Must be between 0 and 1440 inclusive

  • 0 turns power management off

diskdc

230733684.png
230733683.png

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.

  • Must be between 0 and 1440 inclusive

  • 0 turns power management off

hardwareutilization
230733684.png

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:

  • ON - Turns hardware utilization monitoring on

  • OFF - Turns hardware utilization monitoring off

hardwareutilizationsampleinterval
230733684.png

600

Hardware utilization sample interval (in seconds).

  • Must be between 5 and 900 seconds

hardwareutilizationaggregationinterval
230733684.png

60

The aggregation interval (in minutes).

  • Range is 5 to 1440 minutes.

help
230733684.png
230733683.png

Displays the command-line syntax help.

hibernateac

230733684.png
230733683.png

0

Switches the computer to hibernate after a number of minutes of system idle time when the computer is running on mains power.

  • Must be between 0 and 1440 inclusive

  • 0 turns power management off

hibernatedc

230733684.png
230733683.png

0

Switches the computer to hibernate after a number of minutes of system idle time when the computer is running on battery power.

  • Must be between 0 and 1440 inclusive.

  • 0 turns power management off.

hibernatenow

230733684.png
230733683.png

Puts the computer into hibernate mode. Works in conjunction with countdownsecs and shutdownmsg.

Note

Any other switches on the same command-line aborts the hibernate operation and reports an error.

httpserver

230733683.png

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:

./nightwatchman 
-s HTTPServer nwmcserver

To use an IP address of 192.168.23.23:

./nightwatchman 
-s HTTPServer 192.168.23.23

To use nwmcserver as the server using port 180:

./nightwatchman 
-s HTTPServer nwmcserver:180

httpsserver

230733683.png

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.

Note

You cannot use the IP address for the secure server definition.

To set the server name to nwmcserver:

./nightwatchman 
-s HTTPSServer nwmcserver

To set the server name to nwmcserver using port 180:

./nightwatchman 
-s HTTPSServer nwmcserver:180

ignoreerrors

230733684.png

OFF

Behavior on detecting errors in the power-off scripts during a scheduled event.

  • ON – during power-off, errors are ignored and the power-off will continue. User are given the option to cancel the event.

  • OFF – script errors will prevent power-off from taking place

ignorescripterrors

230733683.png

OFF

Behavior on detecting errors in the power-off scripts during a scheduled event.

  • ON – during power-off, errors are ignored and the power-off will continue. Users are given the option to cancel the event.

  • OFF – script errors will prevent power-off from taking place

logfilename
230733684.png

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:

nightwatchman 
-logfilename=C:\TEMP\NW.LOG

logoffaction

230733684.png
230733683.png

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.

Note

This switch is now provided for legacy support only. Use scheduledactions instead.

  • ACTIVE –users are given the opportunity to postpone a log-off. If they are not present and the countdown timer dialog expires, log-off will occur. Log-off will be stopped if any scripts generate an error.

  • FORCE – countdown timer dialog has no option to cancel. All NightWatchman tests run prior to the scheduled event is bypassed. The event ignores errors generated by the power-off scripts. Unsaved data may be lost.

  • PASSIVE –log-off is not actioned if a user is logged on.

macspoolerdirectory

230733683.png

/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.

maintenancewnd

230733684.png
230733683.png

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:

monitorstate=<state>

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:

  • 0 – do nothing

  • 1 – puts the client computer into standby mode

  • 2 – puts the client computer into hibernate mode

  • 3 – powers-off the client computer

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:

nightwatchman 
-maintenancewnd="monitorstate=off|
mon(03:00,23,0)|tue(02:00,60,1)"

maxbatchsendintervalsecs

230733684.png
230733683.png
  • 14400 – purchased license

  • 300 – evaluation license

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.

  • Must be between 1 and 172800

  • The value must be greater than pollintervalsecs and less than waitminutesforunavailableserver.

maximumfileagesecs

230733684.png
230733683.png

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.

maxlogfilesize
230733684.png

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.

  • The minimum value is 1024, as this is the minimum size for any file.

For example, to set a 32K limit for the log file:

nightwatchman 
-maxlogfilesize=32768

minmessagesperbatch

230733684.png
230733683.png
  • 25 – purchased license

  • 5 – evaluation license

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

230733684.png
230733683.png

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.

  • Must be between 0 and 1440 inclusive

  • 0 diables power management

monitordc

230733684.png
230733683.png

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.

  • Must be between 0 and 1440 inclusive

  • 0 disables power management

monitorjobs

230733684.png

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:

  • ON – turns Configuration Manager job monitoring on

  • OFF – turns Configuration Manager job monitoring off

mwturnonmonitor

230733684.png

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:

nightwatchman 
-mwturnonmonitor=on

onceoff

230733684.png
230733683.png

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.

Note

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:

nightwatchman 
-onceoff 
-shutdowntime=19:30 
-logoffaction=force 
-shutdownaction=normal

passwordonwakeup

230733684.png
230733683.png

ON

Determines if a password is required when the client computer resumes from standby or hibernate.Values are:

  • ON – password required on resume from standby or hibernate

  • OFF – no password required

For example, to set the client computer not to request a password on resumption:

nightwatchman 
-passwordonwakeup=off
pelistadd
230733684.png
230733683.png

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:

nightwatchman 
-pelistadd=notepad.exe

pelistclear

230733684.png
230733683.png

Clears all process exceptions.

pelistdel
230733684.png
230733683.png

Deletes a process from the process exception list. For example, to remove the Notepad application process from the process exception list:

nightwatchman 
-pelistdel=notepad.exe
pelistfrom
230733684.png
230733683.png

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.

Note

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:

nightwatchman 
-pelistfrom=myprocesses.txt

pelistshow

230733684.png
230733683.png

Displays the process exception list.

pendingjobwindowmins
230733684.png

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:

  • Shutdown now – if either of the following is true, NightWatchmanwill abort its power down attempt.

    • Pending jobs exist scheduled to start within the specified look-ahead window starting from the current time.

    • There are current running jobs.

  • Scheduled shutdown – if either of the following is true, NightWatchmanwill abort its scheduled power down attempt, and will retry in the configured retry interval.

    • Pending jobs exist scheduled to start within the specified look-ahead window starting from the current time.

    • There are current running jobs.

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.

Note

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

policycertissuer
230733684.png

If using HTTPS for communications and client certificate authentication, set this to the certificate issuer text.

Note

This must be set to the same value as reportingcertissuer.

policycertsubject
230733684.png

If using HTTPS for communications and client certificate authentication, set this to the certificate subject text.

Note

This must be set to the same value as reportingcertsubject.

policyserverurl
230733684.png
230733683.png

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:

nightwatchman -policyserverurl=http://AFServer/AFWebService/PolicyService.asmx
pollintervalmins
230733684.png
230733683.png
  • 1500 – purchased license

  • 15 – evaluation license

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.

  • Must be between 1 and 43200 inclusive.

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 size (selected in the NightWatchman Management Center installer). These are:

  • 1 – very small

  • 90 – small

  • 1500 – medium

  • 3000 – large

pollintervalsecs

230733684.png
230733683.png

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.

pollretryintervalmins
230733684.png
230733683.png
  • 30 – purchased license

  • 5 – evaluation license

Retry interval (in minutes) to check for new power policy settings if the initial check fails.

  • Must be between 1 and 1440 inclusive.

powerscheme

230733684.png
230733683.png

OFF

Controls the setting of a NightWatchman power scheme when the service starts and at user login.

Note

The logged in user requires permissions to be able to change their local power scheme.

  • ON – power scheme is applied when the service starts and when a user logs in

  • OFF – power scheme will not be applied

prerun

230733684.png
230733683.png

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.

  • 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.

  • ON – enables the pre-run script

  • OFF – disables the pre-run script

rebootnow

230733684.png
230733683.png

Reboots the computer. rebootnow works in conjunction with countdownsecs and shutdownmsg.

Note

Any other switches on the same command-line will abort the reboot operation and report an error.

relicense

230733684.png
230733683.png

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:

nwmsvc.exe -start

For example, to relicense NightWatchman for Windows with a new licence key (ABCDE-1234-3456-5678-5678):

nwmsvc.exe 
-relicense=ABCDE-1234-3456-5678-5678

To relicense NightWatchman for Macs with a new licence key (ABCDE-1234-3456-5678-5678):

./nightwatchman 
-s relicense ABCDE-1234-3456-5678-5678
reporting
230733684.png
230733683.png

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

  • ON – enables reporting

  • OFF – disables reporting

reportingcertissuer
230733684.png

If using HTTPS for communications and client certificate authentication, set this to the certificate issuer text.

Note

This must be set to the same value as policycertissuer.

reportingcertsubject
230733684.png

If using HTTPS for communications and client certificate authentication, set this to the certificate subject text.

Note

This must be set to the same value as policycertsubject .

reportingserver

230733684.png

Note

This switch is replaced by reportingserverurl .

reportingserverurl
230733684.png
230733683.png

Replaces reportingserver. Sets the URL for the NightWatchman Management Center Web Service reporting in the format:

http://<server>/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:

nightwatchman -reportingserverurl= http://RServ/AFWebService/PostMessage.aspx

retryattempts

230733684.png
230733683.png

3

Number of times a power-off is attempted if cancelled by the user

  • Must be between 0 and 10 inclusive

For example, to set NightWatchman to try and shutdown 10 time after the user cancels the event:

nightwatchman -retryattempts=10
retryinterval
230733684.png
230733683.png

60

Interval (in minutes) the service retries the power-off if cancelled by the user or if the power-off cannot be performed.

  • Must be between 1 and 60 inclusive.

For example, to set NightWatchman to retry every 15 minutes:

nightwatchman -retryinterval=15
runalways
230733684.png
230733683.png

OFF

Bbehavior 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.

Note

On Windows, the script is called RUNALWAYS.vbs and on the Mac, it is called RunAlways.scpt

  • ON – enables the RunAlways script during a NightWatchman initiated log-off, poweroff or reboot. If the script returns a non-zero value it cancels the event; else it continues.

  • OFF – disables the RunAlways script

runalwaysforsleep
230733684.png
230733683.png

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

  • ON – enables the RunAlways script during a NightWatchman initiated hibernate or standby

  • OFF – disables the RunAlways script during a NightWatchman initiated hibernate or standby

runonresume

230733684.png
230733683.png

OFF

Behavior for the RunOnResume script when the computer resumes from a low-power state.

Note

On Windows the script is called RUNONRESUME.vbs, on the Mac it is called RunOnResume.scpt.

  • ON – enables the RunOnResume script, if it exists, when the computer resumes from a low-power state

  • OFF – disables the RunOnResume script if it exists

runonresumedelaysecs

230733684.png
230733683.png

20

Delay (in seconds) between the resume event and when the RunOnResume script is run.

  • Must be between 20 and 300.

runscriptseverylogoff

230733684.png

Note

This switch is no longer supported.

scheduledactions

230733684.png
230733683.png

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

Symbol

Notes

Values

D

Day of week

SUN,MON,TUE,WED,THU,FRI,

SAT,WEEKDAYS,WEEKEND,

ALLDAYS

where

  • WEEKDAYS = MON,TUE,WED,THU,FRI

  • WEEKEND = SAT,SUN

  • ALLDAYS = all days

T

Power down time

In the format: hh:mm (24hr clock)

P

Power down action

Hibernate, Logoff, Normal, PowerOff, Reboot, Standby, LogoffThenStandby

L

Log off action

Active, Force, Passive

Note

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:

NightWatchman.exe 
–scheduledactions=”ALLDAYS(18:00,
PowerOff,Force)”

To set a power down on Mac at 18:00 with a logoffaction=FORCE for every day of the week:

sudo ./nightwatchman 
–scheduledactions

scripttimeoutsecs

230733684.png
230733683.png

30

Duration (in seconds) NightWatchman waits before deciding a script has timed out.

  • Must be between 1 and 120 inclusive.

Note

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.

securepolicyserverurl
230733684.png

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:

nightwatchman 
-securepolicyserverurl=
 https://AFServer/AFWebService/PolicyService.asm
securereportingserverurl
230733684.png

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:

nightwatchman 
-reportingserverurl= 
    http://RServ/AFWebService/PostMessage.aspx
selistadd
230733684.png

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.

Note

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:

nightwatchman 
-selistadd=SvcHost.exe(LanManServer)
selistclear
230733684.png

Clears all sleepless exclusions.

selistdel
230733684.png

Deletes a process from the sleepless exclusion list. For example, to remove the Notepad process from the sleepless exclusion list:

nightwatchman 
-selistdel=notepad.exe
selistfrom
230733684.png

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.

Note

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

nightwatchman 
-selistfrom=myprocesses.txt
selistshow
230733684.png

Displays the sleepless exclusion list.

settings
230733684.png

Displays the current NightWatchman service configuration parameters on the command-line.

Note

This switch is now identical to the -summary switch.

shutdownaction
230733684.png
230733683.png

Normal

Determines the shutdown type.

Note

This switch is now provided for legacy support only, use scheduledactions instead.

  • Hibernate – puts the machine into hibernate mode

  • Logoff – performs the log-off action only. No shut down performed. The machine is left at the log-on prompt. This action has no power management value but can be used to enforce security.

  • Normal – shuts down and powers off

  • Poweroff – shuts down and power offs, this is a synonym for Normal

  • Reboot – restarts the sysetm. This action has no power management value other than to enforce good housekeeping practice.

  • Standby – puts the machine into standby mode

  • LogoffThenStandby - Same as logoff but also puts the machine into standby mode.

shutdowndays

230733684.png

All days

Note

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.

  • 0 – Sunday

  • 1 – Monday

  • 2 – Tuesday

  • 3 – Wednesday

  • 4 – Thursday

  • 5 – Friday

  • 6 – Saturday

After a default installation NightWatchman is set to operate 7 days a week. For example, to set a range from Monday to Friday:

nightwatchman 
-shutdowndays=1-5

To set a shutdown for Monday,Tuesday and Thursday only:

nightwatchman 
-shutdowndays=1,2,4

shutdownmsg

230733684.png

Customize a countdown message.

Note

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!':

nightwatchman 
-shutdownmsg="Let’s save some energy!"

shutdownnow

230733684.png
230733683.png

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.

Note

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:

nightwatchman 
-shutdownnow 
-logoffaction=force

Note

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

230733684.png

Note

shutdownonce is no longer supported. See onceoff for approximately equivalent behavior.

shutdowntime

230733684.png

Note

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.

  • HH:mm – time in 24 hour format.

  • NOW – no longer supported. Use shutdownnow instead for equivalent behavior

  • OFF – no longer supported. Use scheduledactions=OFF for approximate equivalent behavior.

spoolerdirectory

230733684.png

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

230733684.png
230733683.png

60

Switches the computer to standby after a number of minutes of system idle time when the computer is running on mains power.

  • Must be between 0 and 1440 inclusive

  • 0 disables power management

standbydc

230733684.png
230733683.png

5

Switches the computer to standby after a number of minutes of system idle time when the computer is running on battery power.

  • Must be between 0 and 1440 inclusive

  • 0 disables power management

standbynow

230733684.png
230733683.png

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.

Note

standbynow only applies to the current operation and will not affect global settings.

start

230733684.png

Starts the NightWatchman service. Values are:

  • <no value> – starts the service once.

  • auto – sets the service to auto start.

For example, to start the service:

nwmsvc –start

To set the service to auto start:

nwmsvc –start=auto

stop

230733684.png

Stops the NightWatchman service, for example:

nwmsvc -stop
summary
230733684.png
230733683.png

Displays the current NightWatchman service configuration parameters on the command-line.

Note

summary is identical to settings .

systemtray

230733684.png
230733683.png

Behavior of the system tray applet.

Note

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.

  • ON – displays system tray applet

  • ON1 – displays the system tray applet with the Keep Active option disabled

  • OFF – hides the system tray applet, unless backup documents exist

useractivitymaxidlemins

230733684.png
230733683.png

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.

  • Must be between 0 and 1440 inclusive

  • 0 disables this feature

Note

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:

nightwatchman 
-useractivitymaxidlemins=20
version
230733684.png
230733683.png

Displays the NightWatchman product version number. You will need the version number when contacting 1E support.

waitminutesforunavailableserver

230733684.png
230733683.png

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.