Set-VpnAuthType
Set-VpnAuthType
Sets the authentication type to be used for connecting to a VPN.
Syntax
Parameter Set: Set0
Set-VpnAuthType [-Type] <String> [[-RadiusServer] <String> ] [[-SharedSecret] <String> ] [-AsJob] [-CimSession <CimSession[]> ] [-ComputerName <String> ] [-EntrypointName <String> ] [-MsgAuthenticator <String> ] [-PassThru] [-RadiusPort <UInt16> ] [-RadiusScore <Byte> ] [-RadiusTimeout <UInt32> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Detailed 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.
Parameters
-AsJob
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-CimSession<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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-ComputerName<String>
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-EntrypointName<String>
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
-MsgAuthenticator<String>
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
Disable |
Accept Pipeline Input? |
true (ByPropertyName) |
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-RadiusPort<UInt16>
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
1813 |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
-RadiusScore<Byte>
Specifies the initial score.
The default value is 30.
This parameter can be configured only if the Type parameter is specified to be ExternalRadius.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
30 |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
-RadiusServer<String>
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.
Aliases |
none |
Required? |
false |
Position? |
3 |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
-RadiusTimeout<UInt32>
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
5 |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
-SharedSecret<String>
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.
Aliases |
none |
Required? |
false |
Position? |
4 |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
-ThrottleLimit<Int32>
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.
Aliases |
none |
Required? |
false |
Position? |
named |
Default Value |
none |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-Type<String>
Specifies the authentication type. The acceptable values for this parameter are:
-- Windows.
-- ExternalRadius.
Aliases |
none |
Required? |
true |
Position? |
2 |
Default Value |
none |
Accept Pipeline Input? |
true (ByPropertyName) |
Accept Wildcard Characters? |
false |
-Confirm
Prompts you for confirmation before running the cmdlet.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
-WhatIf
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Required? |
false |
Position? |
named |
Default Value |
false |
Accept Pipeline Input? |
false |
Accept Wildcard Characters? |
false |
<CommonParameters>
This cmdlet supports the common parameters: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer, and -OutVariable. For more information, see about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Inputs
The input type is the type of the objects that you can pipe to the cmdlet.
- None
Outputs
The output type is the type of the objects that the cmdlet emits.
Microsoft.Management.Infrastructure.CimInstance#VpnAuth
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.
Examples
EXAMPLE 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.
PS C:\> Set-VpnAuthType -Type "ExternalRadius" -RadiusServer "10.1.1.1" -SharedSecret "s3cr3t" -PassThru
EXAMPLE 2
This example sets the VPN authentication type to be Windows, which causes authentication to happen on the Remote Access server computer.
PS C:\> Set-VpnAuthType -Type "Windows" -PassThru