Accounting Commands

Applies To: Windows Server 2008

This section contains the following commands:

  • reset filelog

  • reset sqllog

  • set filelog

  • set sqllog

  • show filelog

  • show sqllog

For information on how to interpret netsh command syntax, see Formatting Legend.

Accounting commands

The following entries provide details for each command.

reset filelog

Restores the log file configuration to the default settings.

Syntax

reset filelog

Remarks

By default, the following information is logged by Network Policy Server (NPS):

  • Accounting requests

  • Authentication requests

  • Periodic accounting status

  • Periodic authentication status

The default log file format is database-compatible, and a new log file is created monthly. When the hard disk is full, old log files are automatically deleted to create disk space for new log files. The default log file directory is windir\System32\LogFiles.

reset sqllog

Restores the Microsoft SQL Serverâ„¢ logging configuration to the default settings.

Syntax

reset sqllog

Remarks

By default, SQL Server logging settings are not configured.

set filelog

Sets the configuration for the NPS log file.

Syntax

set filelog [ [ accounting = ] Enable | Disable [ authentication = ] Enable | Disable [ periodicstatus = ] Enable | Disable [ directory = ] directory [ format = ] IAS | ODBC [ deleteold = ] Enable | Disable [ frequency = ] Daily | Weekly | Monthly | Unlimited | Size [ maxsize = ] maxsize ]

Parameters

  • accounting
    Optional. Specifies whether accounting requests are logged by NPS. If you specify Enable, these requests are logged. If you specify Disable, these requests are not logged. The default is Disable.
  • authentication
    Optional. Specifies whether authentication requests are logged by NPS. If you specify Enable, these requests are logged. If you specify Disable, these requests are not logged. The default is Disable.
  • periodicstatus
    Optional. Specifies whether periodic status requests are logged by NPS. If you specify Enable, these requests are logged. If you specify Disable, these requests are not logged. The default is Disable.
  • periodicauthstatus
    Optional. Specifies whether periodic authentication status requests are logged by NPS. If you specify Enable, these requests are logged. If you specify Disable, these requests are not logged. The default is Disable.
  • directory
    Optional. Specifies the folder location where log files are stored. If no folder location is specified, the default folder location is windir\System32\LogFiles.
  • format
    Optional. Specifies the logging format used by NPS. If you specify IAS, IAS format is used. If you specify ODBC, database-compatible format is used.
  • deleteold
    Optional. Specifies whether old log files are deleted when hard disk space is full. If you specify Enable, old log files are automatically deleted when disk space is full. If you specify Disable, old log files are not deleted when disk space is full. The default is Enable.
  • frequency
    Optional. Specifies the frequency at which new log files are created by NPS. If you specify Daily, new log files are created on a daily basis. If you specify Weekly, new log files are created every seven days. If you specify Monthly, new log files are created once per month. If you specify Unlimited, a new log file is never created and NPS always logs to the same file. If you specify Size, NPS creates a new log file when the old log file reaches the size specified with the maxsize parameter. The default is Monthly.
  • maxsize
    Optional. Specifies the maximum size, in megabytes (MB), for the NPS log file. 1-100000 are valid sizes. If you specify a value for maxsize, you must also specify frequency=Size. If you specify frequency=Size and you do not specify a value for maxsize, the value for maxsize is automatically set to 10 MB.

Remarks

You must provide at least one parameter for this command to change log file settings. If you do not supply at least one parameter, no settings are changed.

set sqllog

Modifies the SQL Server logging settings in the NPS configuration.

Syntax

set sqllog [ [ connection = ] connection [ description = ] description [ accounting = ] Enable | Disable [ authentication = ] Enable | Disable [ periodicstatus = ] Enable | Disable [ maxsessions = ] maxsessions ]

Parameters

  • connection
    Optional. Specifies the SQL Server connection initialization string. The basic format of a connection string is based on the Open Database Connectivity (ODBC) connection string. See Remarks for more information.
  • description
    Optional. Specifies a description for the SQL Server connection.
  • accounting
    Optional. Specifies whether accounting requests are logged by NPS. If you specify Enable, these requests are logged. If you specify Disable, these requests are not logged. The default is Disable.
  • authentication
    Optional. Specifies whether authentication requests are logged by NPS. If you specify Enable, these requests are logged. If you specify Disable, these requests are not logged. The default is Disable.
  • periodicstatus
    Optional. Specifies whether periodic status requests are logged by NPS. If you specify Enable, these requests are logged. If you specify Disable, these requests are not logged. The default is Disable.
  • periodicauthstatus
    Optional. Specifies whether periodic authentication status requests are logged by NPS. If you specify Enable, these requests are logged. If you specify Disable, these requests are not logged. The default is Disable.
  • maxsessions
    Optional. Specifies the maximum number of concurrent sessions allowed between the NPS server and the server running SQL Server. 1-100 are valid values. If you do not specify a value for maxsessions, the value for maxsessions is automatically set to 2.

Remarks

  • You must provide at least one parameter for this command to change SQL Server logging settings. If you do not supply at least one parameter, no settings are changed.

  • The format of a SQL Server connection string is based on ODBC connection string syntax. For more information, see the topic Connection String Syntax in the "OLE DB Programmer's Reference" on the Web at https://go.microsoft.com/fwlink/?LinkId=70406.

Example

**set sqllog connection = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Initial Catalog=database_name;Data Source=**server_name"

show filelog

Displays the log file configuration for the local NPS server.

Syntax

show filelog

Remarks

This command displays the accounting configuration for the NPS server on which the command is run. In the NPS console, this information is displayed in Accounting.

Example

Following is an example of the log file settings that are displayed when you run the show filelog command.

Accounting

= Enabled

Authentication

= Enabled

Periodic status

= Enabled

Periodic authentication status

= Enabled

Directory

= C:\Windows\system32\LogFiles

Format

= ODBC formatting

Delete old logs

= Enabled

Frequency

= Monthly logs

Max size

= 10 MB

show sqllog

Displays the SQL Server logging configuration for the local NPS server.

Syntax

show sqllog

Remarks

This command displays the SQL Server accounting configuration for the NPS server on which the command is run. In the NPS console, this information is displayed in Accounting.

Example

Following is an example of the SQL Server logging settings that are displayed when you run the show sqllog command.

Connection

=

Description

=

Accounting

= Enabled

Authentication

= Enabled

Periodic status

= Enabled

Periodic authentication status

= Enabled

Max sessions

= 2

See Also

Concepts

NPS Server Commands
RADIUS Client Commands
Connection Request Policy Commands
Remote RADIUS Server Group Commands
Network Policy Commands
Network Access Protection Commands for NPS