New-EapConfiguration
New-EapConfiguration
Generates an XML file with the specified EAP configuration.
Sintaxis
Parameter Set: EapMsChapv2Auth
New-EapConfiguration [[-UseWinlogonCredential]] [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: EapTlsAuth
New-EapConfiguration [-Tls] [[-VerifyServerIdentity]] [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [-UserCertificate] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: EapTtlsAuth
New-EapConfiguration [-Ttls] [-AsJob] [-CimSession <CimSession[]> ] [-ThrottleLimit <Int32> ] [-TunnledEapAuthMethod <XmlDocument> ] [-TunnledNonEapAuthMethod <String> ] [-UseWinlogonCredential] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: PeapAuth
New-EapConfiguration [-Peap] [[-VerifyServerIdentity]] [[-TunnledEapAuthMethod] <XmlDocument> ] [-AsJob] [-CimSession <CimSession[]> ] [-EnableNap] [-FastReconnect <Boolean> ] [-ThrottleLimit <Int32> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Descripción detallada
The New-EapConfiguration cmdlet creates an XML file with the specified EAP configuration. You use this cmdlet to create the EAP XML configuration file for EAP authentication that is then used by the Set-VpnConnection cmdlet or the Add-VpnConnection cmdlet. If errors happen during the generation of the XML file, the error information is returned.
Parámetros
-AsJob
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-CimSession<CimSession[]>
Ejecuta el cmdlet en una sesión remota o en un equipo remoto. Escriba un nombre de equipo o un objeto de sesión, como la salida de un cmdlet New-CimSession o Get-CimSession. El valor predeterminado es la sesión actual en el equipo local.
Alias |
Session |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-EnableNap
Indicates that the cmdlet enables Network Access Protection (NAP) for PEAP.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
False |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-FastReconnect<Boolean>
Specifies whether to enable FastReconnect in the current PEAP configuration. Specify either $True or $False.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
True |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-Peap
Indicates that PEAP is used as the authentication method.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
2 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-ThrottleLimit<Int32>
Especifica el número máximo de operaciones simultáneas que se pueden establecer para ejecutar el cmdlet. Si se omite este parámetro o es especifica un valor de 0
, Windows PowerShell ® calcula un límite óptimo para el cmdlet en función del número de cmdlets de CIM que se estén ejecutando en el equipo. El límite solo se aplica al cmdlet actual, no a la sesión ni al equipo.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-Tls
Indicates that EAP-TLS, either smart card based or user certificate based, is used as the authentication method.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
2 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-Ttls
Indicates that TTLS is used as the authentication method.
Alias |
ninguno |
¿Requerido? |
true |
¿Posición? |
2 |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-TunnledEapAuthMethod<XmlDocument>
Specifies the configuration XML for tunneled EAP, EAP-TTLS, or PEAP authentication.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-TunnledNonEapAuthMethod<String>
Specifies the simple EAP-TTLS client authentication methods. Los valores aceptables para este parámetro son los siguientes: Pap, Chap, MSChap, and MSCHapv2.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
Pap |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-UserCertificate
Indicates that a user certificate is used for authentication. This parameter is used with EAP-TLS. If this parameter is not specified, a smart card authentication is used.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
False |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-UseWinlogonCredential
Indicates that MSCHAPv2 or EAP-MSCHAPv2 is used as the authentication method, and that Windows logon credentials are used automatically when connecting with the VPN connection profile.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
ninguno |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-VerifyServerIdentity
Indicates that server identity validation is performed for the VPN connection. This parameter is used with PEAP, and EAP-TLS with tunneled EAP client authentication.
Alias |
ninguno |
¿Requerido? |
false |
¿Posición? |
3 |
Valor predeterminado |
False |
¿Aceptar canalización? |
True (ByPropertyName) |
¿Aceptar caracteres comodín? |
false |
-Confirm
Solicita confirmación antes de ejecutar el cmdlet.
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
falso |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
-WhatIf
Muestra lo que sucedería si se ejecutara el cmdlet. El cmdlet no se ejecuta.
¿Requerido? |
false |
¿Posición? |
named |
Valor predeterminado |
falso |
¿Aceptar canalización? |
false |
¿Aceptar caracteres comodín? |
false |
<CommonParameters>
Este cmdlet admite los siguientes parámetros comunes: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer y -OutVariable. Para obtener más información, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Entradas
El tipo de entrada es el tipo de los objetos que se pueden canalizar al cmdlet.
Salidas
El tipo de resultado es el tipo de objetos que emite el cmdlet.
Microsoft.Management.Infrastructure.CimInstance#root/Microsoft/Windows/RemoteAccess/ClientEapConfiguration
El objeto
Microsoft.Management.Infrastructure.CimInstance
es una clase contenedora que muestra objetos de Instrumental de administración de Windows (WMI). La ruta de acceso después del signo de número (#
) proporciona el espacio de nombres y el nombre de clase del objeto WMI subyacente.
The VpnConnection object contains the VpnConnection configuration settings.
Ejemplos
Example 1: Create a default EAP configuration object
This command creates a default EAP configuration object, and stores it in the variable named $A. You can use the XML configuration object stored in the variable when you create a VPN connection or change the configuration of a VPN connection.
PS C:\> $A = New-EapConfiguration
Example 2: Create a customized EAP configuration object
This command creates an EAP configuration object, customized by the UseWinlogonCredential parameter, and stores it in the variable named**$A**. By specifying the UseWinlogonCredential parameter, the EAP configuration object is configured to use MSCHAPv2 as the authentication method, and that Windows logon credentials are used automatically when connecting with the VPN connection profile.
PS C:\> $A = New-EapConfiguration -UseWinlogonCredential
Example 3: Create a TLS customized EAP configuration object
This command creates a customized EAP configuration object and stores it in the variable named $A. The EAP configuration object is customized by specifying the following parameters:
--The Tls parameter, which indicates that this configuration object uses EAP-TLS
-- The VerifyServerIdentity parameter, which indicates that the identity of the server to which the client connects is validated
-- The UserCertificate parameter, which indicates that the EAP-TLS authentication method uses a user certificate.
PS C:\> $A = New-EapConfiguration -Tls -VerifyServerIdentity -UserCertificate
Example 4: Create a TTLS customized EAP configuration object
This command creates an EAP configuration object, customized by the Ttls parameter to use the TTLS authentication method. The configuration object is stored in the variable named $A.
PS C:\> $A = New-EapConfiguration -Ttls
Example 5: Create a TTLS EAP configuration object with MSCHAPv2 as the client authentication method
This command creates a new EAP configuration object and stores it in the variable named $A. The EAP configuration object is customized by specifying the following parameters:
-- The Ttls parameter, which indicates that this configuration object uses TTLS as the authentication method
-- The TunneledNonEapAuthMethod parameter with the MSChapv2 value, which specifies that MSCHAPv2 is used as the specific client authentication method
-- The UseWinlogonCredential parameter, which indicates that Windows logon credentials are used automatically when connecting with the VPN connection profile that uses this EAP configuration object.
PS C:\> $A = New-EapConfiguration -Ttls -TunnledNonEapAuthMethod MSChapv2 -UseWinlogonCredential
Example 6: Create an EAP configuration object and use it as input
This set of commands creates an EAP configuration object customized with a TTLS authentication method which uses EAP-TLS as the tunneled client authentication method.
This command creates an EAP configuration object configured to use an EAP-TLS authentication method and to verify the server identity. The configuration object is stored in a variable named $B.
PS C:\> $B = New-EapConfiguration -Tls -VerifyServerIdentity
This command creates an EAP configuration object configured to use the TTLS authentication method, and specifies the TunnledEapAuthMethod parameter to use the EapConfigXmlStream created by the first EAP configuration object as the tunnel EAP authentication method.
PS C:\> $A = New-EapConfiguration -Ttls -TunnledEapAuthMethod $B.EapConfigXmlStream
Example 7: Create an EAP configuration object that uses PEAP authentication
This command creates an EAP configuration object customized by the PEAP parameter to use the PEAP authentication method. The configuration object is stored in a variable named $A.
PS C:\> $A = New-EapConfiguration -Peap
Example 8: Create a customized EAP configuration object and use it as input
This set of commands creates an EAP configuration object customized with the TLS authentication method, and then uses its EapConfigXmlStream object as the tunneled authentication method.
This command creates the EAP configuration object and stores it in the variable named $B. The EAP configuration object is customized to use the TLS authentication method by the Tls parameter, and configured to verify the identity of the server by the VerifyServerIdentity parameter.
This command implicitly configures a smart card to be used for authentication.
PS C:\> $B = New-EapConfiguration -Tls -VerifyServerIdentity
This command uses the EapConfigXmlStream method of the EAP configuration object created in the previous command to specify the value for the TunnledEapAuthMethod parameter. This command also specifies that PEAP is the authentication method, as specified by the Peap parameter; that NAP is enabled for PEAP, as specified by the EnableNap parameter; and that FastReconnect is enabled, as specified by the FastReconnect parameter.
PS C:\> $a = New-EapConfiguration -Peap -EnableNap -FastReconnect $true -VerifyServerIdentity -TunnledEapAuthMethod $b.EapConfigXmlStream