Add-VMHost
This cmdlet adds a host to be managed by a vCenter Server system. The host is added to the datacenter or folder specified by the Location parameter. One of the User/Password and Credential parameters must be provided in order to authenticate with the host. If both are specified, the Credential parameter is used and the User and Password parameters are ignored.
Syntax
-Name <String>
[-Credential <PSCredential>]
[-Force]
[-Password <String>]
[-Port <Int32>]
[-RunAsync]
[-Server <VIServer[]>]
[-User <String>]
[CommonParameters]
Parameters
Required | Parameter Name | Type | Position | Features | Description |
---|---|---|---|---|---|
required |
|
VIContainer | 1 |
|
Specifies a datacenter or folder where you want to place the host. | required |
|
String | named |
|
Specifies the name of the host you want to add to a vCenter Server system. | optional |
|
PSCredential | named |
|
Specifies a PSCredential object that contains credentials for authenticating with the virtual machine host. | optional |
|
SwitchParameter | named |
|
Indicates that the cmdlet runs even if the authenticity of the host SSL certificate cannot be verified. | optional |
|
String | named |
|
Specifies the password you want to use for authenticating with the host. | optional |
|
Int32 | named |
|
Specifies the port on the host you want to use for the connection. | optional |
|
SwitchParameter | named |
|
Indicates that the command returns immediately without waiting for the task to complete. In this mode, the output of the cmdlet is a Task object. For more information about the RunAsync parameter run "help About_RunAsync" in the VMware PowerCLI console. | optional |
|
VIServer[] | named |
|
Specifies the vCenter Server systems on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-VIServer. | optional |
|
String | named |
|
Specifies the user name you want to use for authenticating with the host. |
Output
VMware.VimAutomation.ViCore.Types.V1.Inventory.VMHost
Examples
Example 1
Adds a VM host to a specified vCenter Server system and provides a username and password for authentication.
Example 2
Adds a VM host to a vCenter Server system and specifies a PSCredential object that contains authentication credentials.
Example 3
Adds a VM host to a vCenter Server system without asking for confirmation and specifies a port on the host for connecting.
Example 4
Adds a VM host to a vCenter Server system even if the authenticity of the host SSL certificate cannot be verified.
Related Commands
VMHost
VMHostAccount
VMHostAdvancedConfiguration
VMHostAuthentication
VMHostAvailableTimeZone
VMHostDiagnosticPartition
VMHostDisk
VMHostDiskPartition
VMHostFirewallDefaultPolicy
VMHostFirewallException
VMHostFirmware
VMHostHardware
VMHostHba
VMHostModule
VMHostNetwork
VMHostNetworkAdapter
VMHostNetworkStack
VMHostNtpServer
VMHostPatch
VMHostPciDevice
VMHostProfile
VMHostProfileCompliance
VMHostProfileImageCacheConfiguration
VMHostProfileRequiredInput
VMHostProfileStorageDeviceConfiguration
VMHostProfileUserConfiguration
VMHostProfileVmPortGroupConfiguration
VMHostRoute
VMHostService
VMHostSnmp
VMHostStartPolicy
VMHostStorage