Set-Dns Client

Sets the interface-specific DNS client configurations on the computer.

Syntax

Set-DnsClient
   [-InterfaceAlias] <String[]>
   [-ConnectionSpecificSuffix <String>]
   [-RegisterThisConnectionsAddress <Boolean>]
   [-UseSuffixWhenRegistering <Boolean>]
   [-ResetConnectionSpecificSuffix]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-DnsClient
   -InterfaceIndex <UInt32[]>
   [-ConnectionSpecificSuffix <String>]
   [-RegisterThisConnectionsAddress <Boolean>]
   [-UseSuffixWhenRegistering <Boolean>]
   [-ResetConnectionSpecificSuffix]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-DnsClient
   -InputObject <CimInstance[]>
   [-ConnectionSpecificSuffix <String>]
   [-RegisterThisConnectionsAddress <Boolean>]
   [-UseSuffixWhenRegistering <Boolean>]
   [-ResetConnectionSpecificSuffix]
   [-CimSession <CimSession[]>]
   [-ThrottleLimit <Int32>]
   [-AsJob]
   [-PassThru]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-DnsClient cmdlet sets the interface-specific DNS client configurations on the computer.

Examples

Example 1: Set the connection-specific suffix

PS C:\> Set-DnsClient -InterfaceIndex 12 -ConnectionSpecificSuffix "corp.contoso.com"

This example sets the connection-specific suffix on an interface with index 12.

Required Parameters

-InputObject

Specifies the input to this cmdlet. You can use this parameter, or you can pipe the input to this cmdlet.

Type: CimInstance[]
Position: Named
Default value: None
Accept pipeline input: True (ByValue)
Accept wildcard characters: False
-InterfaceAlias

Specifies the friendly name of the interface.

Type: String[]
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-InterfaceIndex

Specifies the index number of the interface.

Type: UInt32[]
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

Optional Parameters

-AsJob

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

The cmdlet immediately returns an object that represents the job and then displays the command prompt. You can continue to work in the session while the job completes. To manage the job, use the *-Job cmdlets. To get the job results, use the Receive-Job cmdlet.

For more information about Windows PowerShell background jobs, see about_Jobs .

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

Specifies the connection-specific suffixes to append. This parameter value is a per-connection DNS suffix to append to the computer name to construct a Fully Qualified Domain Name (FQDN). This FQDN is used as the host name for name resolution by the DNS client.

Type: String
Aliases: Suffix
Position: Named
Default value: None
Accept pipeline input: False
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
Accept pipeline input: False
Accept wildcard characters: False
-RegisterThisConnectionsAddress

Indicates whether the IP address for this connection is to be registered. The default value is $True.

Type: Boolean
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
-ResetConnectionSpecificSuffix

Resets the connection-specific suffix to the default value.

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

Indicates whether this host name and the connection-specific suffix for this connection are to be registered.

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

Inputs

Microsoft.Management.Infrastructure.CimInstance#root\StandardCimv2\MSFT_DNSClient

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.

Inputs

Microsoft.Management.Infrastructure.CimInstance#root\StandardCimv2\MSFT_DNSClientServerAddress

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.

Inputs

Microsoft.Management.Infrastructure.CimInstance#root\StandardCimv2\MSFT_NetAdapter

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.

Inputs

Microsoft.Management.Infrastructure.CimInstance#root\StandardCimv2\MSFT_NetIPInterface

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.

Outputs

Microsoft.Management.Infrastructure.CimInstance#root\StandardCimv2\MSFT_DNSClient

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.