Set-VpnAuthType

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

Syntax

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.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:CimSession[]
Aliases:Session
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:String
Aliases:Cn
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters: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.

Type:String
Accepted values:Enabled, Disabled
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters:False

-PassThru

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

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters: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.

Type:UInt16
Aliases:Port
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters: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.

Type:Byte
Aliases:Score
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters: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.

Type:String
Aliases:ServerName
Position:2
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters: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.

Type:UInt32
Aliases:Timeout
Position:Named
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters: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.

Type:String
Position:3
Default value:None
Required:False
Accept pipeline input:True
Accept wildcard characters: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.

Type:Int32
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Type

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

-- Windows.

-- ExternalRadius.

Type:String
Accepted values:Windows, ExternalRadius
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-WhatIf

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

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

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.