PowerCLI Reference

Set-VMHostNetworkStack

Synopsis

This cmdlet modifies the specified host network stack.

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

NameTypeDescriptionRequired?Pipeline InputDefault Value
NetworkStackHostNetworkStack[]Specifies the network stack that you want to configure.trueTrue (ByValue)
ConfirmSwitchParameterIf 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.
falseFalse
CongestionControlAlgoritmHostNetworkStackCongestionControlAlgoritmSpecifies the TCP congest control algorithm used by the network stack.falseFalse
DnsAddressString[]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.
falseFalse
DnsFromDhcpBooleanSpecifies whether or not DHCP (dynamic host control protocol) is used to determine DNS configuration automatically.falseFalse
DomainNameStringSpecifies 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.
falseFalse
HostNameStringSpecifies 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.
falseFalse
MaxNumberOfConnectionsInt32Specifies the maximum number of socket connections that can be requested on the network stack.falseFalse
NameStringSpecifies a new name for the network stack.falseFalse
SearchDomainString[]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.
falseFalse
ServerVIServer[]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.
falseFalse
VMKernelGatewayStringSpecifies an IP address for the default gateway using an IPv4 dot notation.falseFalse
VMKernelV6GatewayStringSpecifies 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.
falseFalse
WhatIfSwitchParameterIndicates that the cmdlet is run only to display the changes that would be made and actually no objects are modified.falseFalse

Return Type

Zero or more HostNetworkStack objects

Notes

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.


Copyright © VMware, Inc. All rights reserved.