Register-SCVMHost
Associates a VMware ESX host with VMM as a virtual machine host and specifies credentials to manage the host.
Syntax
Default (Default)
Register-SCVMHost
[-VMHost] <Host>
[-Credential <VMMCredential>]
[-TCPPort <UInt32>]
[-Certificate <ClientCertificate>]
[-SshTcpPort <UInt32>]
[-SshPublicKey <ClientSshPublicKey>]
[-SshPublicKeyFile <String>]
[-RunAsynchronously]
[-PROTipID <Guid>]
[-JobVariable <String>]
[<CommonParameters>]
Description
The Register-SCVMHost cmdlet associates a VMware ESX host with Virtual Machine Manager (VMM) as a virtual machine host and specifies the credentials to use with this ESX host.
Examples
Example 1: Set the credentials for a specific VMware ESX host
PS C:\> $RunAsAccount = Get-SCRunAsAccount -Name "ESX Host Computer Acct"
PS C:\> $ESXHost = Get-SCVMHost -ComputerName "ESXHost02.Contoso.com"
PS C:\> Register-SCVMHost -VMHost $ESXHost -Credential $RunAsAccount
The first command gets the Run As account object named ESX Host Computer Acct and stores the object in the $RunAsAccount variable.
The second command gets the ESX host object named ESXHost02 and stores the object in the $ESXHost variable.
The last command associates the VMware ESX host with VMM as a managed host, and specifies that the Run As account stored in $Credential should be used to access ESXHost02.
Example 2: Set the credentials and certificate for a specific VMware ESX host
PS C:\> $RunAsAccount = Get-SCRunAsAccount -Name "ESX Host Computer Acct"
PS C:\> $ESXHost = Get-SCVMHost -ComputerName "ESXHost03.contoso.com"
PS C:\> $Cert = Get-SCCertificate -ComputerName "ESXHost03.contoso.com"
PS C:\> Register-SCVMHost -VMHost $ESXHost -Credential $RunAsAccount -Certificate $Cert
The first command gets the Run As account object named ESX Host Computer Acct and stores the object in the $RunAsAccount variable. The required credentials for this operation are either a root account (root/<password>) or the account for the VMware delegated administrator defined earlier in VirtualCenter Server for this ESX host.
The second command gets the VMware ESX host object named ESXHost03 and stores the object in the $ESXHost variable.
The third command uses the Get-SCCertificate cmdlet to get the certificate object from ESXHost02 and stores the object in the $Cert variable.
The last command associates this VMware ESX Server with VMM as a managed host and specifies that the credentials used to access ESXHost02 are those stored in $RunAsAccount.
Parameters
-Certificate
Specifies a security certificate object.
Parameter properties
| Type: | ClientCertificate |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-Credential
Specifies a credential object or, for some cmdlets, a Run As account object that contains the user name and password of an account that has permission to perform this action. Or, in the case of Restart-SCJob, has permission to complete a restarted task.
For more information about the PSCredential object, type Get-Help Get-Credential.
For more information about Run As accounts, type Get-Help New-SCRunAsAccount.
Parameter properties
| Type: | VMMCredential |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-JobVariable
Specifies that job progress is tracked and stored in the variable named by this parameter.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-PROTipID
Specifies the ID of the Performance and Resource Optimization tip (PRO tip) that triggered this action. This parameter lets you audit PRO tips.
Parameter properties
| Type: | Guid |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-RunAsynchronously
Indicates that the job runs asynchronously so that control returns to the command shell immediately.
Parameter properties
| Type: | SwitchParameter |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-SshPublicKey
Specifies the public key used by Secure Shell (SSH) communications.
Parameter properties
| Type: | ClientSshPublicKey |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-SshPublicKeyFile
Specifies the path to the public key file for establishing a secured SSH channel with the target hosts.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-SshTcpPort
Specifies the TCP port number used by the SSH protocol.
Parameter properties
| Type: | UInt32 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-TCPPort
Specifies a numeric value that represents a TCP port.
Parameter properties
| Type: | UInt32 |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | Named |
| Mandatory: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-VMHost
Specifies a virtual machine host object. VMM supports Hyper-V hosts, VMware ESX hosts, and Citrix XenServer hosts.
For more information about each type of host, see the Add-SCVMHost cmdlet.
Parameter properties
| Type: | Host |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
(All)
| Position: | 0 |
| Mandatory: | True |
| Value from pipeline: | True |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable, -ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Outputs
Host
This cmdlet returns a Host object.