powershellscripts.com

Tutorials  PowerShell Cmdlet Help for Add-VMHost



NAME
Add-VMHost

SYNOPSIS
Adds a host to be managed by a vSphere server.

SYNTAX
Add-VMHost [-Name] [-Port ] [-Location] [-Credential ] [-User ]
[-Password ] [-Force] [-RunAsync] [-Server ] [-WhatIf] [-Confirm] []


DESCRIPTION
Adds a host to be managed by a vSphere server. The host is added to the datacenter or folder specified by the Locat
ion parameter. One of the User/Password and Credential parameters must be provided in order to authenticate with th
e host. If both are specified, the Credential parameter is used and the User and Password parameters are ignored.


PARAMETERS
-Name
Specify the name of the host you want to add to a vSphere server.

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

-Port
Specify the port on the host you want to use for the connection.

Required? false
Position? named
Default value For ESX 2.x hosts this is the authd port (902 by default). For ESX 3.x and above t
his is the https port (443 by default).
Accept pipeline input? false
Accept wildcard characters? false

-Location
Specify a datacenter or folder where you want to place the host.

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

-Credential
Specify a PSCredential object that contains credentials for authenticating with the virtual machine host.

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

-User
Specify the user name you want to use for authenticating with the host.

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

-Password
Specifies the password you want to use for authenticating with the host.

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

-Force
Indicates that the cmdlet runs even if the authenticity of the host SSL certificate cannot be verified.

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

-RunAsync
Indicate that the command returns immediately without waiting for the task to complete. In this mode, the outpu
t of the cmdlet is a Task object. For more information about the -RunAsync parameter run " help About_RunAsync"
in the vSphere PowerCLI console.

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

-Server
Specify the vSphere servers on which you want to run the cmdlet. If no value is given to this parameter, the co
mmand runs on the default servers. For more information about default servers, see the description of Connect-V
IServer.

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

-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
VMHost


NOTES


Add-VMHost works only if there is a connection to vCenter Server.

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

C:\PS>Add-VMHost 192.168.113.24 -Location Datacenter -User root -Password pass


Adds an ESX host with IP 192.168.113.24 address to the Datacenter datacenter.






RELATED LINKS
Online version: http://www.vmware.com/support/developer/PowerCLI/PowerCLI501/html/Add-VMHost.html
Get-VMHost
Move-VMHost
Remove-VMHost
Restart-VMHost
Set-VMHost
Start-VMHost
Stop-VMHost
Suspend-VMHost