Freigeben über


Netsh Commands for Network Policy Server in Windows Server 2008 R2

Applies To: Windows Server 2008, Windows Server 2008 R2, Windows Server 2012, Windows Server 2012 R2

All of the netsh commands for NPS in Windows Server® 2008 are also present in Windows Server® 2008 R2. These commands are documented in the topic Netsh Commands for Network Policy Server in Windows Server 2008

In addition, the netsh commands for NPS that are new or changed in Windows Server 2008 R2 are provided below.

This section contains the following commands.

  • import

  • add shvtemplate

  • set shvtemplate

The following entries provide details for each command.

import

Imports the Internet Authentication Service (IAS) server configuration or NPS server configuration from a file. NPS configuration files are in the Extensible Markup Language (XML) file format, while IAS server configuration files are in text format.

Syntax

import [filename =] filename

Parameters

  • filename
    Required. Specifies the name of the text or XML file from which you want to import the NPS or IAS server configuration.

Examples

The following examples illustrate how to use this command to import NPS and IAS files.

import C:\nps.xml

import C:\ias.txt

Remarks

In Windows Server 2008 R2, this Netsh command is modified from the version in Windows Server 2008, and might provide different functionality. For more information, see NPS Server Commands.

add shvtemplate

Adds a system health validator (SHV) template, also called a health policy, to the NPS server configuration.

Syntax

add shvtemplate [ name = ] name [ [ id = ] id [ subid = ] subid [ config = ] ALLMUSTPASS | ALLMUSTFAIL | ONEMUSTPASS | ONEMUSTFAIL ]

Parameters

  • name
    Required. Specifies the friendly name of the health policy.
  • id
    Optional. Specifies one or more valid SHV IDs separated by a comma. If no ID is specified, all SHVs are selected.
  • subid
    Optional. Specifies the system health validator (SHV) configuration id number. You can specify this parameter for each id. If you do not assign a subid, the default subid is used.
  • config
    Optional. Specifies the amount of SHVs that must pass or fail for the conditions of the network policy to be matched. If ALLMUSTPASS is designated, all SHVs configured in the health policy must pass for the conditions of the network policy to be matched. If ALLMUSTFAIL is designated, all SHVs configured in the health policy must fail for the conditions of the network policy to be matched. If ONEMUSTPASS is designated, one SHV configured in the health policy must pass for the conditions of the network policy to be matched. If ONEMUSTFAIL is designated, one SHV configured in the health policy must fail for the conditions of the network policy to be matched. The default is ALLMUSTPASS.

Example

In the following example, a health policy named HealthPolicy1 is added to the NPS server configuration.

add shvtemplate name = "HealthPolicy1"

Remarks

In Windows Server 2008 R2, this Netsh command is modified from the version in Windows Server 2008, and might provide different functionality. For more information, see Network Access Protection Commands for NPS.

set shvtemplate

Changes the value of one or more properties of an existing health policy. Values specified by this command overwrite the existing values.

Syntax

set shvtemplate [ name = ] name [ [ id = ] id [ subid = ] subid [ config = ] ALLMUSTPASS | ALLMUSTFAIL | ONEMUSTPASS | ONEMUSTFAIL ]

Parameters

  • name
    Required. Specifies the friendly name of the health policy.
  • id
    Optional. Specifies one or more valid SHV IDs separated by a comma. If no ID is specified, all SHVs are selected.
  • subid
    Optional. Specifies the system health validator (SHV) configuration id number. You can specify this parameter for each id. If you do not assign a subid, the default subid is used.
  • config
    Optional. Specifies the amount of SHVs that must pass or fail for the conditions of the network policy to be matched. If ALLMUSTPASS is designated, all SHVs configured in the health policy must pass for the conditions of the network policy to be matched. If ALLMUSTFAIL is designated, all SHVs configured in the health policy must fail for the conditions of the network policy to be matched. If ONEMUSTPASS is designated, one SHV configured in the health policy must pass for the conditions of the network policy to be matched. If ONEMUSTFAIL is designated, one SHV configured in the health policy must fail for the conditions of the network policy to be matched. The default is ALLMUSTPASS.

Remarks

In Windows Server 2008 R2, this Netsh command is modified from the version in Windows Server 2008, and might provide different functionality. For more information, see Network Access Protection Commands for NPS.