< Back
Set-VpnConnectionTriggerDnsConfiguration
Post
NAME Set-VpnConnectionTriggerDnsConfiguration
SYNOPSIS
Changes DNS servers for an existing DNS suffix.
SYNTAX
Set-VpnConnectionTriggerDnsConfiguration [-ConnectionName] <String> [[-DnsSuffix] <String>] [[-DnsIPAddress] <String[]>] [[-DnsSuffixSearchList]
<String[]>] [-CimSession <CimSession[]>] [-Force] [-PassThru] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Set-VpnConnectionTriggerDnsConfiguration cmdlet changes Domain Name System (DNS) servers for a DNS suffix that is associated with a virtual private
network (VPN) connection. This cmdlet also configures the DNS suffix search list for a VPN connection.
If you specify a DNS IP address for a suffix, when a client accesses a resource within that suffix, the client starts a VPN connection. You can specify
a list of DNS suffixes for a client to append to short names to try connections by using a specified VPN connection.
PARAMETERS
-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.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-ConnectionName <String>
Specifies the name of a VPN connection profile. To view existing VPN connection profiles, use the Get-VpnConnection cmdlet.
Required? true
Position? 2
Default value none
Accept pipeline input? true(ByPropertyName)
Accept wildcard characters? false
-DnsIPAddress [<String[]>]
Specifies an array IP addresses of DNS servers for the DNS suffix. You can use both IPv4 and IPv6 addresses. If you specify an empty string, when
the client accesses a resource in the DNS suffix, it does not trigger a VPN connection.
Required? false
Position? 4
Default value none
Accept pipeline input? true(ByPropertyName)
Accept wildcard characters? false
-DnsSuffix [<String>]
Specifies a DNS suffix.
Required? false
Position? 3
Default value none
Accept pipeline input? true(ByPropertyName)
Accept wildcard characters? false
-DnsSuffixSearchList [<String[]>]
Specifies an array of DNS suffixes. The client appends a suffix to a short name to create a fully qualified domain name (FQDN). The client tries the
suffixes on this list to see if any of them, appended to a short name, identify a resource.
Required? false
Position? 5
Default value none
Accept pipeline input? true(ByPropertyName)
Accept wildcard characters? false
-Force [<SwitchParameter>]
Indicates that the cmdlet makes changes to the VPN connection trigger DNS configuration without a confirmation message.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output. If you specify this
parameter, the cmdlet returns the VpnConnectionTriggerDnsConfiguration object that contains DNS suffixes and corresponding DNS servers, and the DNS
suffix search list.
Required? false
Position? named
Default value none
Accept pipeline input? false
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.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.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, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
Microsoft.Management.Infrastructure.CimInstance#VpnConnectionTriggerDnsConfiguration
Example 1: Change the DNS server for a DNS suffix
PS C:\\>Set-VpnConnectionTriggerDnsConfiguration -ConnectionName "Contoso" -DnsSuffix "washington.contoso.com" -DnsIPAddress "172.16.12.3" -PassThru
-Force
ConnectionName DnsSuffix DnsIPAddress DnsSuffixSearchList
-------------- --------- ------------ -------------------
Contoso washington.contos... {207.64.32.54}
This command changes the IP address for the DNS server for a DNS suffix to a value of 172.16.12.3. Use the DnsIPAddress parameter to specify the new
value. The command specifies the VPN connection profile named Contoso and the DNS suffix washington.contoso.com. The command includes the PassThru
parameter. Therefore, it returns the VPN connection DNS trigger properties for the client. Because the command includes the Force parameter, it does not
prompt you for confirmation.
Example 2: Change the DNS suffix search list for a VPN connection
PS C:\\>Set-VpnConnectionTriggerDnsConfiguration -ConnectionName "Contoso" -DnsSuffixSearchList "corp.contoso.com", "sales.Contoso.com" -PassThru -Force
ConnectionName DnsSuffix DnsIPAddress DnsSuffixSearchList
-------------- --------- ------------ -------------------
Contoso {corp.contoso.com, sales.contoso....
This command changes the DNS suffix search list for the VPN connection profile named Contoso to be the two specified DNS suffixes. The command includes
the PassThru parameter. Therefore, it returns the VPN connection DNS trigger properties for the client. Because the command includes the Force
parameter, it does not prompt you for confirmation.
RELATED LINKS
Add-VpnConnectionTriggerDnsConfiguration
Get-VpnConnection
Remove-VpnConnectionTriggerDnsConfiguration
SYNOPSIS
Changes DNS servers for an existing DNS suffix.
SYNTAX
Set-VpnConnectionTriggerDnsConfiguration [-ConnectionName] <String> [[-DnsSuffix] <String>] [[-DnsIPAddress] <String[]>] [[-DnsSuffixSearchList]
<String[]>] [-CimSession <CimSession[]>] [-Force] [-PassThru] [-ThrottleLimit <Int32>] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Set-VpnConnectionTriggerDnsConfiguration cmdlet changes Domain Name System (DNS) servers for a DNS suffix that is associated with a virtual private
network (VPN) connection. This cmdlet also configures the DNS suffix search list for a VPN connection.
If you specify a DNS IP address for a suffix, when a client accesses a resource within that suffix, the client starts a VPN connection. You can specify
a list of DNS suffixes for a client to append to short names to try connections by using a specified VPN connection.
PARAMETERS
-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.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-ConnectionName <String>
Specifies the name of a VPN connection profile. To view existing VPN connection profiles, use the Get-VpnConnection cmdlet.
Required? true
Position? 2
Default value none
Accept pipeline input? true(ByPropertyName)
Accept wildcard characters? false
-DnsIPAddress [<String[]>]
Specifies an array IP addresses of DNS servers for the DNS suffix. You can use both IPv4 and IPv6 addresses. If you specify an empty string, when
the client accesses a resource in the DNS suffix, it does not trigger a VPN connection.
Required? false
Position? 4
Default value none
Accept pipeline input? true(ByPropertyName)
Accept wildcard characters? false
-DnsSuffix [<String>]
Specifies a DNS suffix.
Required? false
Position? 3
Default value none
Accept pipeline input? true(ByPropertyName)
Accept wildcard characters? false
-DnsSuffixSearchList [<String[]>]
Specifies an array of DNS suffixes. The client appends a suffix to a short name to create a fully qualified domain name (FQDN). The client tries the
suffixes on this list to see if any of them, appended to a short name, identify a resource.
Required? false
Position? 5
Default value none
Accept pipeline input? true(ByPropertyName)
Accept wildcard characters? false
-Force [<SwitchParameter>]
Indicates that the cmdlet makes changes to the VPN connection trigger DNS configuration without a confirmation message.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-PassThru [<SwitchParameter>]
Returns an object representing the item with which you are working. By default, this cmdlet does not generate any output. If you specify this
parameter, the cmdlet returns the VpnConnectionTriggerDnsConfiguration object that contains DNS suffixes and corresponding DNS servers, and the DNS
suffix search list.
Required? false
Position? named
Default value none
Accept pipeline input? false
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.
Required? false
Position? named
Default value none
Accept pipeline input? false
Accept wildcard characters? false
-Confirm [<SwitchParameter>]
Prompts you for confirmation before running the cmdlet.Prompts you for confirmation before running the cmdlet.
Required? false
Position? named
Default value false
Accept pipeline input? false
Accept wildcard characters? false
-WhatIf [<SwitchParameter>]
Shows what would happen if the cmdlet runs. The cmdlet is not run.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, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
Microsoft.Management.Infrastructure.CimInstance#VpnConnectionTriggerDnsConfiguration
Example 1: Change the DNS server for a DNS suffix
PS C:\\>Set-VpnConnectionTriggerDnsConfiguration -ConnectionName "Contoso" -DnsSuffix "washington.contoso.com" -DnsIPAddress "172.16.12.3" -PassThru
-Force
ConnectionName DnsSuffix DnsIPAddress DnsSuffixSearchList
-------------- --------- ------------ -------------------
Contoso washington.contos... {207.64.32.54}
This command changes the IP address for the DNS server for a DNS suffix to a value of 172.16.12.3. Use the DnsIPAddress parameter to specify the new
value. The command specifies the VPN connection profile named Contoso and the DNS suffix washington.contoso.com. The command includes the PassThru
parameter. Therefore, it returns the VPN connection DNS trigger properties for the client. Because the command includes the Force parameter, it does not
prompt you for confirmation.
Example 2: Change the DNS suffix search list for a VPN connection
PS C:\\>Set-VpnConnectionTriggerDnsConfiguration -ConnectionName "Contoso" -DnsSuffixSearchList "corp.contoso.com", "sales.Contoso.com" -PassThru -Force
ConnectionName DnsSuffix DnsIPAddress DnsSuffixSearchList
-------------- --------- ------------ -------------------
Contoso {corp.contoso.com, sales.contoso....
This command changes the DNS suffix search list for the VPN connection profile named Contoso to be the two specified DNS suffixes. The command includes
the PassThru parameter. Therefore, it returns the VPN connection DNS trigger properties for the client. Because the command includes the Force
parameter, it does not prompt you for confirmation.
RELATED LINKS
Add-VpnConnectionTriggerDnsConfiguration
Get-VpnConnection
Remove-VpnConnectionTriggerDnsConfiguration