powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Set-VMGuestNetworkInterface



NAME
Set-VMGuestNetworkInterface

SYNOPSIS
Configures the network settings of a virtual machine using VMware Tools.

SYNTAX
Set-VMGuestNetworkInterface -VmGuestNetworkInterface [-WinsPolicy ] [-Wins
] [-DnsPolicy ] [-Dns ] [-IPPolicy ] [[-Gateway] ] [[-Netmask]
] [[-Ip] ] [-ToolsWaitSecs ] [-GuestPassword ] [-GuestUser ] [-Gues
tCredential ] [-HostPassword ] [-HostUser ] [-HostCredential ] [-
WhatIf] [-Confirm] []


DESCRIPTION
Configures the network settings of a virtual machine using VMware Tools. The cmdlet allows IP and routing configura
tion. You can modify Wins settings only for Windows virtual machines. The cmdlet sends a remote script which execut
es inside the virtual machine in the context of the specified user account. This cmdlet supports only Windows XP 32
SP3, Windows Server 2003 32bit SP2, Windows Server 2003 64bit SP2, Windows 7 64 bit, Windows Server 2008 R2 64bit
and Redhat Enterprise 5 operating systems.


PARAMETERS
-VmGuestNetworkInterface
Specify the guest network interface you want to configure.

Required? true
Position? named
Default value
Accept pipeline input? true (ByValue)
Accept wildcard characters? true

-WinsPolicy
Specify the Wins policy. The valid values are Static and Dhcp.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Wins
Specify WINS servers. Use this parameter only if The WinsPolicy parameter is set to Static.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-DnsPolicy
Specify the DNS policy. The valid values are Static and Dhcp.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Dns
Specify DNS addresses. Use this parameter only if The DnsPolicy parameter is set to Static.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-IPPolicy
Specify the IP policy. The valid values are Static and Dhcp.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Gateway
Specify a gateway.

Required? false
Position? 3
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Netmask
Specify a net mask.

Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Ip
Specify an IP address. Use this parameter only if The IpPolicy parameter is set to Static.

Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false

-ToolsWaitSecs
Specify the time in seconds to wait for a response from the VMware Tools. If a non-positive value is provided,
the system waits infinitely long time.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-GuestPassword
Specify the password you want to use for authenticating with the guest OS.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-GuestUser
Specify the user name you want to use for authenticating with the guest OS.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-GuestCredential
Specify a PSCredential object that contains credentials for authenticating with the guest OS. Do not use this p
arameter if the -GuestUser and -GuestPassword parameters are used.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-HostPassword
Specify the password you want to use for authenticating with the host. You need to specify host credentials onl
y if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX versi
on you have installed is earlier than 1.10.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-HostUser
Specify the user name you want to use for authenticating with the host. You need to specify host credentials on
ly if the version of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX vers
ion you have installed is earlier than 1.10.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-HostCredential
Specify a PSCredential object that contains credentials for authenticating with the host. Do not use this param
eter if the -HostUser and -HostPassword parameters are used. You need to specify host credentials only if the v
ersion of the vCenter Server or ESX you are authenticating with is earlier than 4.0, or the VIX version you hav
e installed is earlier than 1.10.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-WhatIf
Indicate that the cmdlet is run only to display the changes that would be made and actually no objects are modi
fied.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Confirm
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.

Required? false
Position? named
Default value $true
Accept pipeline input? false
Accept wildcard characters? false


This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
VMGuestNetwork


NOTES


Supported on ESX 3.5 Update 2 and newer.
This cmdlet works only in 32-bit mode.
This cmdlet is experimental and might be changed or removed in a future release.

-------------- Example 1 --------------

C:\PS>Set-VMGuestNetworkInterface -VMGuestNetworkInterface $vmGuestNetworkInterface -HostUser Admin -HostPassword P
ass01 -GuestUser User -GuestPassword Pass02 -Netmask 255.255.255.255 -Gateway 10.23.112.58


Changes the net mask and the gateway of the specified guest network interface,






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Set-VMGuestNetworkInterface.html
Get-VMGuestNetworkInterface