Edit

Share via


Set-VpnAuthType

Sets the authentication type to be used for connecting to a VPN.

Syntax

Default (Default)

Set-VpnAuthType
    [-Type] <String>
    [[-RadiusServer] <String>]
    [[-SharedSecret] <String>]
    [-RadiusTimeout <UInt32>]
    [-RadiusScore <Byte>]
    [-RadiusPort <UInt16>]
    [-ComputerName <String>]
    [-MsgAuthenticator <String>]
    [-EntrypointName <String>]
    [-PassThru]
    [-CimSession <CimSession[]>]
    [-ThrottleLimit <Int32>]
    [-AsJob]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Set-VpnAuthType cmdlet is only used to toggle from one authentication type to another. This cmdlet cannot be used to explicitly add any additional RADIUS servers if RADIUS authentication is being used.

-- The parameters for RADIUS authentication properties, such as the MsgAuthenticator, RadiusPort, RadiusScore, RadiusServer, RadiusTimeout and SharedSecret parameters, are applicable only when the ExternalRadius authentication is configured.

Examples

EXAMPLE 1

PS C:\>Set-VpnAuthType -Type "ExternalRadius" -RadiusServer "10.1.1.1" -SharedSecret "s3cr3t" -PassThru
Type             : ExternalRadius
RadiusServerList : {10.1.1.1}

This example sets the VPN authentication type to be ExternalRadius. A RADIUS server is specified along with the shared secret required to communicate with that RADIUS server.

EXAMPLE 2

PS C:\>Set-VpnAuthType -Type "Windows" -PassThru
Type             : Windows
RadiusServerList :

This example sets the VPN authentication type to be Windows, which causes authentication to happen on the Remote Access server computer.

Parameters

-AsJob

Runs the cmdlet as a background job. Use this parameter to run commands that take a long time to complete.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-CimSession

Runs the cmdlet in a remote session or on a remote computer. Enter a computer name or a session object, such as the output of a New-CimSession or Get-CimSession cmdlet. The default is the current session on the local computer.

Parameter properties

Type:

CimSession[]

Default value:None
Supports wildcards:False
DontShow:False
Aliases:Session

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-ComputerName

Specifies the IPv4 or IPv6 address, or host name, of the computer on which the VPN server computer specific tasks should be run. If this parameter is specified, then the authentication type is configured for that VPN server.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Cn

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-EntrypointName

Identifies a site in a multi-site deployment for which the authentication type needs to be configured.

If this parameter is not specified in a multi-site deployment, then this parameter value on which the cmdlet is run is used. The server could also be represented by using the ComputerName parameter.

If this parameter and the ComputerName parameter are specified and the ComputerName does not belong to the site represented by this parameter, then this parameter takes precedence and the authentication type is configured for it.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-MsgAuthenticator

Specifies the enabled state for the usage of message authenticator. The acceptable values for this parameter are:

-- Enabled.

-- Disabled. This is the default value.

This parameter can be configured only if the Type parameter is specified to be ExternalRadius.

Parameter properties

Type:String
Default value:None
Accepted values:Enabled, Disabled
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-PassThru

Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output.

Parameter properties

Type:SwitchParameter
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-RadiusPort

Specifies the port number on which the RADIUS server is accepting authentication requests.

The default value is 1813.

This parameter can be configured only if the Type parameter is specified to be ExternalRadius.

Parameter properties

Type:UInt16
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Port

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-RadiusScore

Specifies the initial score.

The default value is 30.

This parameter can be configured only if the Type parameter is specified to be ExternalRadius.

Parameter properties

Type:Byte
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Score

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-RadiusServer

Specifies the IPv4 or IPv6 address, or host name, of the external RADIUS server that is used for accounting. This parameter can be configured only if the Type parameter is specified to be ExternalRadius.

Specifying the corresponding shared secret is mandatory. The default values can be used for the other parameters.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False
Aliases:ServerName

Parameter sets

(All)
Position:2
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-RadiusTimeout

Specifies the RADIUS time out value, in seconds.

The default value is 5 seconds.

This parameter can be configured only if the Type parameter is specified to be ExternalRadius.

Parameter properties

Type:UInt32
Default value:None
Supports wildcards:False
DontShow:False
Aliases:Timeout

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-SharedSecret

Specifies the shared secret between the Remote Access server and the specified external RADIUS server which is required for successful communication between the two servers. Note: The secret is specified in clear text.

This parameter can be configured only if the Type parameter is specified to be ExternalRadius.

When specifying a RADIUS server for authentication, it is mandatory to also specify the shared secret. The default values can be used for the other parameters.

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:3
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-ThrottleLimit

Specifies the maximum number of concurrent operations that can be established to run the cmdlet. If this parameter is omitted or a value of 0 is entered, then Windows PowerShell® calculates an optimum throttle limit for the cmdlet based on the number of CIM cmdlets that are running on the computer. The throttle limit applies only to the current cmdlet, not to the session or to the computer.

Parameter properties

Type:Int32
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-Type

Specifies the authentication type. The acceptable values for this parameter are:

-- Windows.

-- ExternalRadius.

Parameter properties

Type:String
Default value:None
Accepted values:Windows, ExternalRadius
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:True
Value from remaining arguments:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

Inputs

String

UInt32

Byte

UInt16

Outputs

CimInstance

CimInstance

The Microsoft.Management.Infrastructure.CimInstance object is a wrapper class that displays Windows Management Instrumentation (WMI) objects. The path after the pound sign (#) provides the namespace and class name for the underlying WMI object.

The VpnAuth object consists of the following properties:

-- Authentication type: Windows or ExternalRadius.

-- Configured RADIUS servers: If external RADIUS authentication was set, then the configured RADIUS servers are displayed.