Syntax
Set-VMHostNetworkStack [-NetworkStack] <HostNetworkStack[]> [-CongestionControlAlgoritm {Cubic | NewReno}] [-DnsAddress <String[]>] [-DnsFromDhcp <Boolean>] [-DomainName <String>] [-HostName <String>] [-MaxNumberOfConnections <Int32>] [-Name <String>] [-SearchDomain <String[]>] [-VMKernelGateway <String>] [-VMKernelV6Gateway <String>] [-Server <VIServer[]>] [-Confirm] [-WhatIf] [<CommonParameters>]Related Commands
Detailed Description
This cmdlet configures the specified host network stack.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
NetworkStack | HostNetworkStack[] | Specifies the network stack that you want to configure. | true | True (ByValue) | |
Confirm | SwitchParameter | If the value is $true, indicates that the cmdlet asks for confirmation before running.
If the value is $false, the cmdlet runs without asking for user confirmation. | false | False | |
CongestionControlAlgoritm | HostNetworkStackCongestionControlAlgoritm | Specifies the TCP congest control algorithm used by the network stack. | false | False | |
DnsAddress | String[] | Specifies the IP addresses of the DNS servers, placed in order of preference.
Note: When DHCP is not enabled, the property can be set explicitly. When DHCP is enabled, the property cannot be set. | false | False | |
DnsFromDhcp | Boolean | Specifies whether or not DHCP (dynamic host control protocol) is used to determine DNS configuration automatically. | false | False | |
DomainName | String | Specifies the domain name portion of the DNS name. For example, "vmware.com".
Note: When DHCP is not enabled, the property can be set explicitly. When DHCP is enabled, the property cannot be set. | false | False | |
HostName | String | Specifies the host name portion of DNS name. For example, "esx01".
Note: When DHCP is not enabled, the property can be set explicitly. When DHCP is enabled, the property cannot be set. | false | False | |
MaxNumberOfConnections | Int32 | Specifies the maximum number of socket connections that can be requested on the network stack. | false | False | |
Name | String | Specifies a new name for the network stack. | false | False | |
SearchDomain | String[] | Specifies the domain in which to search for hosts, placed in order of preference.
Note: When DHCP is not enabled, the property can be set explicitly. When DHCP is enabled, the property cannot be set. | false | False | |
Server | VIServer[] | Specifies the vCenter Server systems on which you want to run the cmdlet.
If no value is given to this parameter, the command runs on the default servers. For more information about default servers, see the description of the Connect-VIServer cmdlet. | false | False | |
VMKernelGateway | String | Specifies an IP address for the default gateway using an IPv4 dot notation. | false | False | |
VMKernelV6Gateway | String | Specifies the default IPv6 gateway using the following format: <IPv6>/<subnet_prefix_length> or <IPv6>.
If you skip <subnet_prefix_length>, the default value of 64 is used. | false | False | |
WhatIf | SwitchParameter | Indicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified. | false | False |
Return Type
Zero or more HostNetworkStack objectsNotes
Examples
-------------------------- Example 1 --------------------------
$vmHostNetworkStack = Get-VMHostNetworkStack -VMHost Host Set-VMHostNetworkStack -Network $vmHostNetworkStack -VMKernelGateway 10.23.11.11 -DomainName eng.vmware.com -HostName Host1 -DnsFromDhcp $false
Retrieves the network stack configuration of the virtual machine host named Host.
Sets the virtual machine kernel gateway, the domain name, the host name, and the Dhcp of the network.