Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

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:

Code Block
nightwatchman.exe -<switch>=<value>



Advanced Panelboxes for Confluence
nameidgrey1
titleOn this page:
Table of Contents
maxLevel2
minLevel2
indent20px


For example, to set the NightWatchman service to start automatically:

Code Block
nwmsvc.exe -start=auto


Note
iconfalse
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/optionNotes
nwmsvc -relicenseLicenses NightWatchman with the valid license key.
nwmsvc -startStarts the NightWatchman service.
nwmsvc -stopStops the NightWatchman service.


Executable information switches

You can use these to display information about the current version and settings.

SwitchNotes
versionDisplays the NightWatchman product version number. You will need the version number when contacting 1E support.
settingsDisplays the current NightWatchman service configuration parameters on the command-line.
summaryDisplays the current NightWatchman service configuration parameters on the command-line.
helpDisplays the command-line syntax help.


System switches

Use these to control the core functionality of NightWatchman.

SwitchNotes
countdowndlgtextEnables customization of a countdown message.
countdownsecsNumber of seconds that the countdown timer dialog is displayed before a power-off or log-off action is executed.
hibernatenowPuts the computer into hibernate mode. Works in conjunction with countdownsecs and shutdownmsg.
logoffactionDetermines the behavior when a user is logged onto the system. In Active and Force mode, scripts are executed to close down applications gracefully.
monitorjobsTurns 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.
onceoffDetermines whether the other switches on the NightWatchman command-line is applied in a once-off operation.
pendingjobwindowminsDefines the power down behavior according to pending Configuration Manager jobs.
retryattemptsNumber of times a power-off is attempted if cancelled by the user.
retryintervalInterval (in minutes) the service retries the power-off if cancelled by the user or if the power-off cannot be performed.
runalwaysSets 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.
runalwaysforsleepBehavior for running the RunAlways script during a NightWatchman initiated hibernate or standby.
scheduledactionsConfigures scheduled power down actions at specific times for specified days of the week.
scripttimeoutsecsNumber of seconds NightWatchman waits before deciding a script has timed out.
shutdownactionUse scheduledactions instead.
shutdowndaysUse scheduledactions instead.
shutdownmsgEnables customization of a countdown message.
shutdownnowImplements an immediate power-off, regardless of shutdownaction.
shutdowntimeUse scheduledactions instead.
standbynowPuts the computer into standby mode. standbynow works in conjunction with countdownsecs and shutdownmsg.
systemtrayControls the behavior of the system tray applet.
useractivitymaxidleminsDuration (in minutes) for the window that governs the recent user activity test.


Script control switches

Use these to control the behavior of NightWatchman scripts.

SwitchNotes
prerunEnables a custom script to be run, prior to a NightWatchm an p ower-off, hibernate or standby event.
runalwaysBehavior for running the RunAlways script during a NightWatchman initiated log-off, power-off or reboot.
runalwaysforsleepBehavior for running the RunAlways script during a NightWatchman initiated hibernate or standby.
runonresumeBehavior for the RunOnResume script when the computer resumes from a low-power state.
scripttimeoutsecsNumber 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.

SwitchNotes
policyserverurlSets the location of the NightWatchman Management Center policy service.
pollintervalminsSets the polling interval, in minutes, to check for new Power Policy settings.
pollretryintervalminsSets 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.

SwitchNotes
powerschemeControls the setting of a NightWatchm an p ower scheme when the service starts and at user login.
monitoracSwitches the monitor to standby after a specified number of minutes of system idle time when the computer is running on mains power.
monitordcSwitches the monitor to standby after a specified number of minutes of system idle time when the computer is running on battery power.
diskacSwitches the hard disks to standby after a specified number of minutes of system idle time when the computer is running on mains power.
diskdcSwitches the hard disks to standby after a specified number of minutes of system idle time when the computer is running on battery power.
standbyacSwitches the computer to standby after a specified number of minutes of system idle time when the computer is running on mains power.
standbydcSwitches the computer to standby after a specified number of minutes of system idle time when the computer is running on battery power.
hibernateacSwitches the computer to hibernate after a specified number of minutes of system idle time when the computer is running on mains power.
hibernatedcSwitches the computer to hibernate after a specified number of minutes of system idle time when the computer is running on battery power.
passwordonwakeupDetermines 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.

SwitchNotes
hardwareutilizationEnables or disables the Hardware Utilization feature.
hardwareutilizationsampleintervalHardware utilization sample interval in seconds.
hardwareutilizationaggregationintervalAggregation interval in minutes.


Process exception switches

Use these 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.

SwitchNotes
pelistshowDisplays the process exception list.
pelistaddAdds a process name to the process exception list. The name must match the name of the process as it appears in Task Manager.
pelistdelDeletes a process from the process exception list.
pelistfromReplaces 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.
pelistclearClears 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.

SwitchNotes
advancedsleeplessdetectionTurns advanced sleepless detection mode on or off.
busyprocessdetectionTurns busy process detection on or off.
selistshowDisplays the sleepless exclusion list.
selistaddAdds 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.
selistdelDeletes a process from the sleepless exclusion list.
selistfromReplaces 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.
selistclearClears all sleepless exclusions.


Alarm clock and maintenance window switches

Use these to control alarm clocks and maintenance windows.

SwitchNotes
alarmclockSets an alarm clock schedule for specific days of the week.
acturnonmonitorDetermines if the display for a computer is turned on when an alarm clock wake up occurs.
maintenancewndMaintenance schedule for specific days of the week.
mwturnonmonitorDetermines 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.

SwitchNotes
policycertissuerWhen using HTTPS for communications and client certificate authentication, set this to the certificate issuer text.
policycertsubjectWhen using HTTPS for communications and client certificate authentication, set this to the certificate subject text.
reportingcertissuerWhen using HTTPS for communications and client certificate authentication, set this to the certificate issuer text.
reportingcertsubjectWhen using HTTPS for communications and client certificate authentication, set this to the certificate subject text.
policyserverurlSets the URL of the NightWatchman Management Center policy service.
reportingSets the status of NightWatchman reporting.
reportingserverurlSets the URL for the NightWatchman Management Center Web Service reporting.
securepolicyserverurlSets the URL for the secure NightWatchman Management Center policy service.
securereportingserverurlSets the URL for the secure NightWatchman Management Center Web Service reporting.


Log file switches

Use these to set options for the log file.

SwitchNotes
debugLevel of debug information output to the NightWatchman log file.
logfilenameLocation and name for the NightWatchman log file.
maxlogfilesizeMaximum size (in bytes) for the NightWatchman log file.


Command-line switches

PropertyDefault valueNotes

Anchor
acturnonmonitor
acturnonmonitor
acturnonmonitor

 

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:

Code Block
nightwatchman 
-acturnonmonitor=on


Anchor
advancedsleeplessdetection
advancedsleeplessdetection
advancedsleeplessdetection

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:

Code Block
nightwatchman 
-advancedsleeplessdetection=off


Anchor
alarmclock
alarmclock
alarmclock

 

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

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

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


Anchor
autorestart
autorestart
autorestart

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

Anchor
busyprocessdetection
busyprocessdetection
busyprocessdetection

ON

Disables busy process detection.

Note
iconfalse
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:

Code Block
nightwatchman 
-busyprocesssdetection=on


Anchor
countdowndlgtext
countdowndlgtext
countdowndlgtext

 

Customize a countdown message.

Note
iconfalse
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.

Anchor
countdownsecs
countdownsecs
countdownsecs

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:

Code Block
nightwatchman 
-countdownsecs=300


Anchor
debug
debug
debug

13Sets the level of debug information output to the NightWatchman log file. You should only change this value after checking with the 1E support.

Anchor
delaysecs
delaysecs
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.
  • Must be between 30 and 300 inclusive

To set a 1 minute delay before the countdown starts:

Code Block
nightwatchman 
-delaysecs=60


Anchor
diskac
diskac
diskac

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

Anchor
diskdc
diskdc
diskdc

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

Anchor
hardwareutilization
hardwareutilization
hardwareutilization

OFFEnables 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

Anchor
hardwareutilizationsampleinterval
hardwareutilizationsampleinterval
hardwareutilizationsampleinterval

600Hardware utilization sample interval (in seconds).
  • Must be between 5 and 900 seconds

Anchor
hardwareutilizationaggregationinterval
hardwareutilizationaggregationinterval
hardwareutilizationaggregationinterval

60The aggregation interval (in minutes).
  • Range is 5 to 1440 minutes.

Anchor
help
help
help

 
Displays the command-line syntax help.

Anchor
hibernateac
hibernateac
hibernateac

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

Anchor
hibernatedc
hibernatedc
hibernatedc

0Switches 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.

Anchor
hibernatenow
hibernatenow
hibernatenow

 

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

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


Anchor
httpserver
httpserver
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:

Code Block
./nightwatchman 
-s HTTPServer nwmcserver


To use an IP address of 192.168.23.23:

Code Block
./nightwatchman 
-s HTTPServer 192.168.23.23


To use nwmcserver as the server using port 180:

Code Block
./nightwatchman 
-s HTTPServer nwmcserver:180


Anchor
httpsserver
httpsserver
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.

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

To set the server name to nwmcserver:

Code Block
./nightwatchman 
-s HTTPSServer nwmcserver

To set the server name to nwmcserver using port 180:

Code Block
./nightwatchman 
-s HTTPSServer nwmcserver:180


Anchor
ignoreerrors
ignoreerrors
ignoreerrors

OFFBehavior 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

Anchor
ignorescripterrors
ignorescripterrors
ignorescripterrors

OFFBehavior 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

Anchor
logfilename
logfilename
logfilename

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:

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


Anchor
logoffaction
logoffaction
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.

Note
iconfalse
This switch is now provided for legacy support only. Use scheduledactions instead.
  • ACTIVE –


    Multiexcerpt
    MultiExcerptNamenwe72-logoff-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 –

    Multiexcerpt
    MultiExcerptNamenwe72-logoff-passive
    log-off is not actioned if a user is logged on.


Anchor
macspoolerdirectory
macspoolerdirectory
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.

Anchor
maintenancewnd
maintenancewnd
maintenancewnd

 

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:

Code Block
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:

Code Block
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:

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


Anchor
maxbatchsendintervalsecs
maxbatchsendintervalsecs
maxbatchsendintervalsecs

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

Anchor
maximumfileagesecs
maximumfileagesecs
maximumfileagesecs

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.

Anchor
maxlogfilesize
maxlogfilesize
maxlogfilesize

1048578 bytes
Maximum size (in bytes) for the NightWatchman log file. If the log file exceeds this value NightWatchman saves the curent 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:

Code Block
nightwatchman 
-maxlogfilesize=32768


Anchor
minmessagesperbatch
minmessagesperbatch
minmessagesperbatch

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

Anchor
monitorac
monitorac
monitorac


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

Anchor
monitordc
monitordc
monitordc

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

Anchor
monitorjobs
monitorjobs
monitorjobs

ONEnables 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

Anchor
mwturnonmonitor
mwturnonmonitor
mwturnonmonitor

 

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:

Code Block
nightwatchman 
-mwturnonmonitor=on


Anchor
onceoff
onceoff
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.

Note
iconfalse
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:

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


Anchor
passwordonwakeup
passwordonwakeup
passwordonwakeup

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:

Code Block
nightwatchman 
-passwordonwakeup=off


Anchor
pelistadd
pelistadd
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. For example, to set Nightwatchman to abort power-offs when the Notepad application is running:

Code Block
nightwatchman 
-pelistadd=notepad.exe


Anchor
pelistclear
pelistclear
pelistclear

 
Clears all process exceptions.

Anchor
pelistdel
pelistdel
pelistdel

 

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

Code Block
nightwatchman 
-pelistdel=notepad.exe


Anchor
pelistfrom
pelistfrom
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.

Note
iconfalse
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:

Code Block
nightwatchman 
-pelistfrom=myprocesses.txt


Anchor
pelistshow
pelistshow
pelistshow

 
Displays the process exception list.

Anchor
pendingjobwindowmins
pendingjobwindowmins
pendingjobwindowmins

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


Anchor
policycertissuer
policycertissuer
policycertissuer

 

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

Note
iconfalse
This must be set to the same value as reportingcertissuer.


Anchor
policycertsubject
policycertsubject
policycertsubject

 

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

Note
iconfalse
This must be set to the same value as reportingcertsubject.


Anchor
policyserverurl
policyserverurl
policyserverurl

 

URL of the NightWatchman Management Center policy service in the format:

Code Block
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:

Code Block
nightwatchman -policyserverurl=http://AFServer/AFWebService/PolicyService.asmx


Anchor
pollintervalmins
pollintervalmins
pollintervalmins

  • 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

Anchor
pollintervalsecs
pollintervalsecs
pollintervalsecs

600Interval (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.

Anchor
pollretryintervalmins
pollretryintervalmins
pollretryintervalmins

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

Anchor
powerscheme
powerscheme
powerscheme

OFF

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

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

Anchor
prerun
prerun
prerun

 
Enables a custom script to be run, prior to a NightWatchman power-off, hibernate or standby event.
Excerpt Include
NightWatchman scripts
NightWatchman scripts
nopaneltrue
  • ON – enables the pre-run script
  • OFF – disables the pre-run script

Anchor
rebootnow
rebootnow
rebootnow

 

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

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


Anchor
relicense
relicense
relicense

 

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:

Code Block
nwmsvc.exe -start

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

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

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

Code Block
./nightwatchman 
-s relicense ABCDE-1234-3456-5678-5678


Anchor
reporting
reporting
reporting

 
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

Anchor
reportingcertissuer
reportingcertissuer
reportingcertissuer

 

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

Note
iconfalse
This must be set to the same value as policycertissuer.


Anchor
reportingcertsubject
reportingcertsubject
reportingcertsubject

 

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

Note
iconfalse
This must be set to the same value as policycertsubject .


Anchor
reportingserver
reportingserver
reportingserver

 


Note
iconfalse
This switch is replaced by reportingserverurl .


Anchor
reportingserverurl
reportingserverurl
reportingserverurl

 

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

Code Block
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:

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


Anchor
retryattempts
retryattempts
retryattempts

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:

Code Block
nightwatchman -retryattempts=10


Anchor
retryinterval
retryinterval
retryinterval

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:

Code Block
nightwatchman -retryinterval=15


Anchor
runalways
runalways
runalways

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

Anchor
runalwaysforsleep
runalwaysforsleep
runalwaysforsleep

OFF

Behavior for running the RunAlways script during a NightWatchman initiated hibernate or standby.

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

Anchor
runonresume
runonresume
runonresume

OFF

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

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

Anchor
runonresumedelaysecs
runonresumedelaysecs
runonresumedelaysecs

20Delay (in seconds) between the resume event and when the RunOnResume script is run.
  • Must be between 20 and 300.

Anchor
runscriptseverylogoff
runscriptseverylogoff
runscriptseverylogoff

 


Note
iconfalse
This switch is no longer supported.


Anchor
scheduledactions
scheduledactions
scheduledactions

 

Configures scheduled power down actions at specific times for specified days of the week. The syntax for Windows is

Code Block
D{,D,D}(T,P,L){| D{,D,D}(T,P,L)}

and for Macs

Code Block
D{,D,D}=T,P,L { D{,D,D}=T,P,L}

where

SymbolNotesValues
DDay 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
TPower down timeIn the format: hh:mm (24hr clock)
PPower down action

Hibernate, Logoff, Normal, PowerOff, Reboot, Standby, PowerOffThenStandbyLogoffThenStandby

LLog off actionActive, Force, Passive


Note
iconfalse
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:

Code Block
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:

Code Block
sudo ./nightwatchman 
–scheduledactions


Anchor
scripttimeoutsecs
scripttimeoutsecs
scripttimeoutsecs

30
Duration (in seconds) NightWatchman waits before deciding a script has timed out.
  • Must be between 1 and 120 inclusive.
Note
iconfalse
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.


Anchor
securepolicyserverurl
securepolicyserverurl
securepolicyserverurl

 

URL for the secure NightWatchman Management Center policy service in the format

Code Block
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:

Code Block
nightwatchman 
-securepolicyserverurl=
 https://AFServer/AFWebService/PolicyService.asm


Anchor
securereportingserverurl
securereportingserverurl
securereportingserverurl

 

URL for the secure NightWatchman Management Center Web Service reporting in the format:

Code Block
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:

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


Anchor
selistadd
selistadd
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. Normally, the name matches the Task Manager process but for running services that are hosted by SvcHost, SvcHost.exe will be reported back.

Note
iconfalse
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:

Code Block
nightwatchman 
-selistadd=SvcHost.exe(LanManServer)


Anchor
selistclear
selistclear
selistclear

 
Clears all sleepless exclusions.

Anchor
selistdel
selistdel
selistdel

 

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

Code Block
nightwatchman 
-selistdel=notepad.exe


Anchor
selistfrom
selistfrom
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.

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

Code Block
nightwatchman 
-selistfrom=myprocesses.txt


Anchor
selistshow
selistshow
selistshow

 
Displays the sleepless exclusion list.

Anchor
settings
settings
settings

 

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

Note
iconfalse
This switch is now identical to the -summary switch.


Anchor
shutdownaction
shutdownaction
shutdownaction

Normal

Determines the shutdown type.

Note
iconfalse
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.

Anchor
shutdowndays
shutdowndays
shutdowndays

All days


Note
iconfalse
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:

Code Block
nightwatchman 
-shutdowndays=1-5

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

Code Block
nightwatchman 
-shutdowndays=1,2,4


Anchor
shutdownmsg
shutdownmsg
shutdownmsg

 

Customize a countdown message.

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

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


Anchor
shutdownnow
shutdownnow
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.

Note
iconfalse
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:

Code Block
nightwatchman 
-shutdownnow 
-logoffaction=force


Note
iconfalse
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.


Anchor
shutdownonce
shutdownonce
shutdownonce

 


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


Anchor
shutdowntime
shutdowntime
shutdowntime

 


Note
iconfalse
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.

Anchor
spoolerdirectory
spoolerdirectory
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.

Anchor
standbyac
standbyac
standbyac

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

Anchor
standbydc
standbydc
standbydc

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

Anchor
standbynow
standbynow
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.

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


Anchor
start
start
start

 
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:

Code Block
nwmsvc –start

To set the service to auto start:

Code Block
nwmsvc –start=auto


Anchor
stop
stop
stop

 

Stops the NightWatchman service, for example:

Code Block
nwmsvc -stop


Anchor
summary
summary
summary

 

 



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

Note
iconfalse
summary is identical to settings .


Anchor
systemtray
systemtray
systemtray

 

Behavior of the system tray applet.

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

Anchor
useractivitymaxidlemins
useractivitymaxidlemins
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.
  • Must be between 0 and 1440 inclusive
  • 0 disables this feature
Note
iconfalse
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:

Code Block
nightwatchman 
-useractivitymaxidlemins=20


Anchor
version
version
version

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

Anchor
waitminutesforunavailableserver
waitminutesforunavailableserver
waitminutesforunavailableserver

1440Duration (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.