Add-SCVMHost

Add-SCVMHost

Adds a computer as a virtual machine host.

構文

Parameter Set: DomainJoined
Add-SCVMHost [-ComputerName] <String> -Credential <VMMCredential> [-AvailableForPlacement <Boolean]> ] [-BaseDiskPaths <String> ] [-CPUPercentageReserve <UInt16]> ] [-Description <String> ] [-DiskSpaceReserveMB <UInt64]> ] [-EnableLiveMigration <Boolean]> ] [-IsDedicatedToNetworkVirtualizationGateway <Boolean]> ] [-JobVariable <String> ] [-LiveMigrationMaximum <UInt32]> ] [-LiveStorageMigrationMaximum <UInt32]> ] [-MaintenanceHost <Boolean]> ] [-MaxDiskIOReservation <UInt64]> ] [-MemoryReserveMB <UInt64]> ] [-MigrationAuthProtocol <MigrationAuthProtocolType]> ] [-MigrationPerformanceOption <MigrationPerformanceOptionType]> ] [-MigrationSubnet <String[]> ] [-NetworkPercentageReserve <UInt16]> ] [-PROTipID <Guid]> ] [-Reassociate <Boolean]> ] [-RemoteConnectEnabled <Boolean]> ] [-RemoteConnectPort <UInt32]> ] [-RunAsynchronously] [-UseAnyMigrationSubnet <Boolean]> ] [-VMHostGroup <HostGroup> ] [-VMMServer <ServerConnection> ] [-VMPaths <String> ] [ <CommonParameters>]

Parameter Set: Clustered
Add-SCVMHost [-ComputerName] <String> -Credential <VMMCredential> -VMHostCluster <HostCluster> [-AvailableForPlacement <Boolean]> ] [-BaseDiskPaths <String> ] [-Certificate <ClientCertificate> ] [-CPUPercentageReserve <UInt16]> ] [-Description <String> ] [-DiskSpaceReserveMB <UInt64]> ] [-EnableLiveMigration <Boolean]> ] [-EnableSecureMode <Boolean> ] [-IsDedicatedToNetworkVirtualizationGateway <Boolean]> ] [-JobVariable <String> ] [-LiveMigrationMaximum <UInt32]> ] [-LiveStorageMigrationMaximum <UInt32]> ] [-MaintenanceHost <Boolean]> ] [-MaxDiskIOReservation <UInt64]> ] [-MemoryReserveMB <UInt64]> ] [-MigrationAuthProtocol <MigrationAuthProtocolType]> ] [-MigrationPerformanceOption <MigrationPerformanceOptionType]> ] [-MigrationSubnet <String[]> ] [-NetworkPercentageReserve <UInt16]> ] [-PROTipID <Guid]> ] [-Reassociate <Boolean]> ] [-RemoteConnectEnabled <Boolean]> ] [-RemoteConnectPort <UInt32]> ] [-RunAsynchronously] [-TCPPort <UInt32]> ] [-UseAnyMigrationSubnet <Boolean]> ] [-VMMServer <ServerConnection> ] [-VMPaths <String> ] [ <CommonParameters>]

Parameter Set: ESXHost
Add-SCVMHost [-ComputerName] <String> -Credential <VMMCredential> -VirtualizationManager <VirtualizationManager> [-AvailableForPlacement <Boolean]> ] [-BaseDiskPaths <String> ] [-Certificate <ClientCertificate> ] [-CPUPercentageReserve <UInt16]> ] [-Description <String> ] [-DiskSpaceReserveMB <UInt64]> ] [-EnableLiveMigration <Boolean]> ] [-JobVariable <String> ] [-LiveMigrationMaximum <UInt32]> ] [-LiveStorageMigrationMaximum <UInt32]> ] [-MaintenanceHost <Boolean]> ] [-MaxDiskIOReservation <UInt64]> ] [-MemoryReserveMB <UInt64]> ] [-MigrationAuthProtocol <MigrationAuthProtocolType]> ] [-MigrationPerformanceOption <MigrationPerformanceOptionType]> ] [-MigrationSubnet <String[]> ] [-NetworkPercentageReserve <UInt16]> ] [-PROTipID <Guid]> ] [-Reassociate <Boolean]> ] [-RemoteConnectEnabled <Boolean]> ] [-RemoteConnectPort <UInt32]> ] [-RunAsynchronously] [-SshPublicKey <ClientSshPublicKey> ] [-SshPublicKeyFile <String> ] [-SshTcpPort <UInt32]> ] [-TCPPort <UInt32]> ] [-UseAnyMigrationSubnet <Boolean]> ] [-VMHostGroup <HostGroup> ] [-VMMServer <ServerConnection> ] [-VMPaths <String> ] [ <CommonParameters>]

Parameter Set: NonTrustedDomain
Add-SCVMHost [-ComputerName] <String> -Credential <VMMCredential> -NonTrustedDomainHost [-AvailableForPlacement <Boolean]> ] [-BaseDiskPaths <String> ] [-CPUPercentageReserve <UInt16]> ] [-Description <String> ] [-DiskSpaceReserveMB <UInt64]> ] [-EnableLiveMigration <Boolean]> ] [-IsDedicatedToNetworkVirtualizationGateway <Boolean]> ] [-JobVariable <String> ] [-LiveMigrationMaximum <UInt32]> ] [-LiveStorageMigrationMaximum <UInt32]> ] [-MaintenanceHost <Boolean]> ] [-MaxDiskIOReservation <UInt64]> ] [-MemoryReserveMB <UInt64]> ] [-MigrationAuthProtocol <MigrationAuthProtocolType]> ] [-MigrationPerformanceOption <MigrationPerformanceOptionType]> ] [-MigrationSubnet <String[]> ] [-NetworkPercentageReserve <UInt16]> ] [-PROTipID <Guid]> ] [-Reassociate <Boolean]> ] [-RemoteConnectEnabled <Boolean]> ] [-RemoteConnectPort <UInt32]> ] [-RunAsynchronously] [-UseAnyMigrationSubnet <Boolean]> ] [-VMHostGroup <HostGroup> ] [-VMMServer <ServerConnection> ] [-VMPaths <String> ] [ <CommonParameters>]

Parameter Set: PerimeterNetwork
Add-SCVMHost [-ComputerName] <String> -EncryptionKey <PSCredential> -PerimeterNetworkHost -SecurityFile <String> [-AvailableForPlacement <Boolean]> ] [-BaseDiskPaths <String> ] [-CPUPercentageReserve <UInt16]> ] [-Description <String> ] [-DiskSpaceReserveMB <UInt64]> ] [-EnableLiveMigration <Boolean]> ] [-JobVariable <String> ] [-LiveMigrationMaximum <UInt32]> ] [-LiveStorageMigrationMaximum <UInt32]> ] [-MaintenanceHost <Boolean]> ] [-MaxDiskIOReservation <UInt64]> ] [-MemoryReserveMB <UInt64]> ] [-MigrationAuthProtocol <MigrationAuthProtocolType]> ] [-MigrationPerformanceOption <MigrationPerformanceOptionType]> ] [-MigrationSubnet <String[]> ] [-NetworkPercentageReserve <UInt16]> ] [-PROTipID <Guid]> ] [-Reassociate <Boolean]> ] [-RemoteConnectEnabled <Boolean]> ] [-RemoteConnectPort <UInt32]> ] [-RunAsynchronously] [-UseAnyMigrationSubnet <Boolean]> ] [-VMHostGroup <HostGroup> ] [-VMMServer <ServerConnection> ] [-VMPaths <String> ] [ <CommonParameters>]

Parameter Set: XenServerHost
Add-SCVMHost [-ComputerName] <String> -Credential <VMMCredential> -XenServerHost [-AvailableForPlacement <Boolean]> ] [-BaseDiskPaths <String> ] [-Certificate <ClientCertificate> ] [-CPUPercentageReserve <UInt16]> ] [-Description <String> ] [-DiskSpaceReserveMB <UInt64]> ] [-EnableLiveMigration <Boolean]> ] [-EnableSecureMode <Boolean> ] [-JobVariable <String> ] [-LiveMigrationMaximum <UInt32]> ] [-LiveStorageMigrationMaximum <UInt32]> ] [-MaintenanceHost <Boolean]> ] [-MaxDiskIOReservation <UInt64]> ] [-MemoryReserveMB <UInt64]> ] [-MigrationAuthProtocol <MigrationAuthProtocolType]> ] [-MigrationPerformanceOption <MigrationPerformanceOptionType]> ] [-MigrationSubnet <String[]> ] [-NetworkPercentageReserve <UInt16]> ] [-PROTipID <Guid]> ] [-Reassociate <Boolean]> ] [-RemoteConnectEnabled <Boolean]> ] [-RemoteConnectPort <UInt32]> ] [-RunAsynchronously] [-TCPPort <UInt32]> ] [-UseAnyMigrationSubnet <Boolean]> ] [-VMHostGroup <HostGroup> ] [-VMMServer <ServerConnection> ] [-VMPaths <String> ] [ <CommonParameters>]

詳細説明

The Add-SCVMHost cmdlet adds one or more computers as virtual machine hosts to Virtual Machine Manager (VMM). A virtual machine host is a physical computer managed by VMM whose role is to host one or more virtual machines.

From the perspective of networking and domains, the types of hosts supported in System Center 2012 - VMM include:

-- Domain-joined Windows host. The host can be located in either a trusted or untrusted domain.
-- Perimeter network Windows host. A non-domain-joined Windows host can be managed in the same way as a perimeter network Windows host that is located in a domain.
-- A VMware ESX host. ESX hosts do not use Windows Active Directory domains.
-- A Citrix XenServer host. XenServer hosts are managed in the same way whether or not they are configured to use Windows Active Directory.

From the perspective of virtualization platform and operating system, the types of hosts supported in System Center 2012 - VMM include:

-- Hyper-V hosts. A server running Windows Server 2008 or later with the Hyper-V role enabled.
-- VMware ESX hosts. A VMware ESX host running proprietary software, including a hypervisor, that is managed by a VMware vCenter Server running Windows.
-- Citrix XenServer hosts. A Citrix XenServer server running proprietary software, including a hypervisor.

System Center 2012 - VMM manages these three types of hosts, even though each host type implements virtualization in a different way. The following paragraphs describe each type of host in more detail. For more information, see System Requirements: Virtual Machine Hosts (https://go.microsoft.com/fwlink/?LinkId=217486) in the Microsoft TechNet Library.

Before you add a Hyper-V host, review System Requirements: Hyper-V Hosts (https://go.microsoft.com/fwlink/?LinkID=213749) in the Microsoft TechNet Library.

The Add-SCVMHost cmdlet will enable the Hyper-V server role for you, but you must first manually configure the Virtualization option in the BIOS.

To manage a Windows-based host in a perimeter network:

-- Install the Virtual Machine Manager agent locally on the perimeter network host.
-- When you run VMM Setup and choose the option indicating that this host is on a perimeter network, the wizard prompts you to provide an encryption key for the security file and to specify where you want to store the security file.
-- After you have installed the local agent, obtain the security file from the folder in which it is stored. The default location is: C:\Program Files\Microsoft System Center 2012\Virtual Machine Manager, and the name of the security file is SecurityFile.txt.
-- Copy the security file to a location that is accessible to the computer on which a VMM console is installed.
-- When you use Add-SCVMHost to add the perimeter network host, you must specify the same encryption key and point to the local security file by using the EncryptionKey and SecurityFile parameters. Following is an example format for these parameters:

Example format: -SecurityFile "C:\SecurityFile.txt" -EncryptionKey $Key

Example 2 outlines the cmdlets to use to add a perimeter network host.

Before you add a VMWare ESX host, see System Requirements: VMware ESX Hosts (https://go.microsoft.com/fwlink/?LinkID=215885) in the Microsoft TechNet Library.

Before you add a Citrix XenServer host, see System Requirements: Citrix XenServer Hosts (https://go.microsoft.com/fwlink/?LinkId=217487) in the Microsoft TechNet Library.

パラメーター

-AvailableForPlacement<Boolean]>

Indicates whether the VMM placement process will consider this host or this volume on a host to be eligible as a possible location on which to deploy virtual machines. If this parameter is set to $False, you can choose to deploy virtual machines on this host or volume anyway. The default value is $True. This parameter does not apply to VMware ESX hosts.

When this parameter is used with network adapters, if set to $False, then placement will not consider the logical networks configured on this network adapter to determine if the host is suitable for connecting a virtual machine.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-BaseDiskPaths<String>

Specifies the paths to base disks.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Certificate<ClientCertificate>

Specifies a security certificate object.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-ComputerName<String>

Specifies the name of a computer that VMM can uniquely identify on your network. Valid formats are:

-- FQDN
-- IPv4 or IPv6 address
-- NetBIOS name

NOTE: See the examples for a specific cmdlet to determine how that cmdlet specifies the computer name.

エイリアス

none

必須?

true

位置は?

1

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-CPUPercentageReserve<UInt16]>

Specifies the percentage of CPU to reserve for the use of the operating system on the physical host computer. If you do not use this parameter to specify the reserve, the default setting for the host group is used: 10 percent. The VMM placement process will not recommend that a virtual machine be placed on a host unless its resource requirements can be met without using host reserves.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Credential<VMMCredential>

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.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Description<String>

States a description for the specified object.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-DiskSpaceReserveMB<UInt64]>

Specifies, in megabytes (MB), the amount of disk space to reserve for the use of the operating system on the physical host computer. If you do not use this parameter to specify the reserve, the default setting for the host group is used: 100 MB. The VMM placement process will not recommend that a virtual machine be placed on a host unless its resource requirements can be met without using host reserves.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-EnableLiveMigration<Boolean]>

Indicates whether live migration is enabled on the host.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-EnableSecureMode<Boolean>

Indicates whether VMM communicates with VMware ESX hosts and Citrix XenServer hosts in secure mode. The default value is $True.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-EncryptionKey<PSCredential>

Specifies credentials to be used as an encryption key when you add a Hyper-V host located in a perimeter network to VMM.

Example format: -SecurityFile "C:\SecurityFile.txt" -EncryptionKey $Key

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-IsDedicatedToNetworkVirtualizationGateway<Boolean]>

Indicates whether the host is dedicated to a network virtualization gateway.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-JobVariable<String>

Specifies that job progress is tracked and stored in the variable named by this parameter.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-LiveMigrationMaximum<UInt32]>

Specifies the maximum number of simultaneous live migrations.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-LiveStorageMigrationMaximum<UInt32]>

Specifies the maximum number of simultaneous live storage migrations.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-MaintenanceHost<Boolean]>

This parameter is obsolete. Use AvailableForPlacement instead.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-MaxDiskIOReservation<UInt64]>

Specifies the maximum disk I/O per second (IOPS) on the physical host computer. If you do not use this parameter to specify the reserve, the default setting for the host group is used: 10000. The VMM placement process will not recommend that a virtual machine be placed on a host unless its resource requirements can be met without using host reserves.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-MemoryReserveMB<UInt64]>

Specifies, in megabytes (MB), the amount of memory to reserve for the use of the host operating system on the physical host computer. If you do not use this parameter to specify the reserve, the default setting for the host group is used: 256 MB. The VMM placement process will not recommend that a virtual machine be placed on a host unless its resource requirements can be met without using host reserves.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-MigrationAuthProtocol<MigrationAuthProtocolType]>

Specifies the authorization protocol used for migration. Valid values are: CredSSP, Kerberos.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-MigrationPerformanceOption<MigrationPerformanceOptionType]>

Specifies the migration performance option type. Valid values are:

-- Standard
-- UseCompression
-- UseSmbTransport

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-MigrationSubnet<String[]>

Specifies an array of subnets to use for migration.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-NetworkPercentageReserve<UInt16]>

Specifies the percentage of network capacity to reserve for the use of the host operating system on the physical host computer. If you do not use this parameter to specify the reserve, the default setting for the host group is used: 10 percent. The VMM placement process will not recommend that a virtual machine be placed on a host unless its resource requirements can be met without using host reserves.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-NonTrustedDomainHost

Indicates that the host to be added to VMM belongs to a non-trusted domain.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-PerimeterNetworkHost

Indicates that this host is located in a perimeter network.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-PROTipID<Guid]>

Specifies the ID of the PRO tip that triggered this action. This allows for auditing of PRO tips.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-Reassociate<Boolean]>

Reassociates a host currently managed by one VMM server with another VMM server.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-RemoteConnectEnabled<Boolean]>

Indicates whether to enable, when set to $True, a connection on a host server that lets users connect to their virtual machines remotely. This parameter only applies to virtual machines on Hyper-V hosts. It is not applicable to virtual machines on VMware ESX hosts or Citrix XenServer hosts.

エイリアス

VMRCEnabled

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-RemoteConnectPort<UInt32]>

Specifies a default value for the TCP port to use when a remote user connects to a virtual machine. Typically, the default port for a Hyper-V host is 2179. This parameter does not apply to VMware ESX hosts or Citrix XenServer hosts.

エイリアス

VMRCPort

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-RunAsynchronously

Indicates that the job runs asynchronously so that control returns to the command shell immediately.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-SecurityFile<String>

Specifies the path to a file that contains the certificate and credentials to use for authentication of a Hyper-V host located in a perimeter network. This parameter does not apply to VMware ESX hosts or Citrix XenServer hosts.

Example format: -SecurityFile "C:\SecurityFile.txt" -EncryptionKey $Key

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-SshPublicKey<ClientSshPublicKey>

Specifies the public key used by Secure Shell (SSH) communications.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-SshPublicKeyFile<String>

Specifies the path to the public key file for establishing a secured SSH channel with the target hosts.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-SshTcpPort<UInt32]>

Specifies the TCP port number used by the Secure Shell (SSH) protocol.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-TCPPort<UInt32]>

Specifies a numeric value that represents a TCP port.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-UseAnyMigrationSubnet<Boolean]>

Indicates whether any subnet can be used for migration.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VirtualizationManager<VirtualizationManager>

Specifies a virtualization manager object managed by VMM.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VMHostCluster<HostCluster>

Specifies a VMM host cluster object.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VMHostGroup<HostGroup>

Specifies a virtual machine host group object.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-VMMServer<ServerConnection>

Specifies a VMM server object.

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

True (ByValue)

ワイルドカード文字を許可する

false

-VMPaths<String>

Specifies a set of default paths (as strings separated by the pipeline operator) on a host where virtual machine files can be stored.

Example format: -VMPaths "C:\Folder1|C:\Folder2|C:\Folder3"

エイリアス

none

必須?

false

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

-XenServerHost

Indicates that the specified host is a Citrix XenServer host.

エイリアス

none

必須?

true

位置は?

named

既定値

none

パイプライン入力を許可する

false

ワイルドカード文字を許可する

false

<CommonParameters>

このコマンドレットは次の共通パラメーターをサポートします。-Verbose、-Debug、-ErrorAction、-ErrorVariable、-OutBuffer、-OutVariable.詳細については、以下を参照してください。 about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216)。

入力

入力型は、コマンドレットにパイプできるオブジェクトの型です。

出力

出力型は、コマンドレットによって生成されるオブジェクトの型です。

  • Host

Example 1: Add a host in the same domain as the VMM server

The first command gets the Run As account object named HostComputer RunAsAccount, and then stores the object in the $RunAsAccount variable.The required credentials for this operation are either a local Administrator account or a domain account with administrator rights on the computer that you want to add as a host.

The second command adds the host object named VMHost01 in the Contoso domain to VMM as a managed host, specifies a description, enables remote connections, and specifies that TCP port 5900 will be used for remote connections to VMHost01. As the last command is processed, $RunAsAccount provides credentials to Add-SCVMHost.

PS C:\> $RunAsAccount = Get-SCRunAsAccount -Name "RunAsAcct01"
PS C:\> Add-SCVMHost "VMHost01.Contoso.com" -Description "This is a new host" -RemoteConnectEnabled $True -RemoteConnectPort 5900 -Credential $RunAsAccount

Example 2: Add a host located in a perimeter network to VMM

The first command prompts you for a user name and password, and then stores the credentials in $Key. The user name can be any user name, but the password must be the same encryption key that was used when the VMM agent was installed on this computer. The VMM agent must be installed locally on a computer located in a perimeter network by choosing the local agent option when you run Setup. You specify the encryption key for the security file on the Security File Folder page of the System Center Virtual Machine Manager Agent Setup wizard.

The second command adds a host object that represents the computer named VMHost02 to the VMM database as a managed host. The command adds a description, disables remote connections, and specifies that this host is located in a perimeter network. This command uses the credentials stored in $Key to decrypt the contents of SecurityFile.txt (which, in this example, is located at C:\) and then uses the contents of SecurityFile.txt to authenticate the new host.

PS C:\> $Key = Get-SCCredential
PS C:\> Add-SCVMHost "VMHost02" -Description "This is my new perimeter network host" -RemoteConnectEnabled $False -PerimeterNetworkHost -SecurityFile "C:\SecurityFile.txt" -EncryptionKey $Key

Example 3: Add a host located in a non-trusted domain to VMM

The first command gets the Run As account object named RunAsAccount02, and stores the object in the $RunAsAccount variable. The required credentials for this operation are an account with administrator rights to add a host located in the non-trusted domain to the VMM server in the Contoso.com domain.

The second command adds VMHost03, located in a domain that is not trusted by Contoso.com, to the VMM database as a managed host. As this command is processed, $RunAsAccount provides credentials to Add-SCVMHost.

PS C:\> $RunAsAccount = Get-SCRunAsAccount -Name "RunAsAccount02"
PS C:\> Add-SCVMHost "VMHost03.NonTrustedDomain.com" -VMMServer "VMMServer01.Contoso.com" -NonTrustedDomainHost -Credential $RunAsAccount

Example 4: Add a VMware ESX host to VMM

The first command gets the host group object named HostGroup02, and then stores the object in the $HostGroup variable.

The second command gets the Run As account object named ESX Host Computer Acct, and then stores the object in the $RunAsAccount variable.

The third command gets the virtualization manager object named VirtMgrServer02, and then stores the object in the $VirtMgr variable.

The last command adds ESX Host01 to HostGroup02. The command provides the credentials in the form of a Run As account stored in $RunAsAccount, which is required to add this host to VMM.

PS C:\> $HostGroup = Get-SCVMHostGroup "HostGroup02"
PS C:\> $RunAsAccount = Get-SCRunAsAccount -Name "ESX Host Computer Acct"
PS C:\> $VirtMgr = Get-SCVirtualizationManager -ComputerName "VirtMgrServer02.Contoso.com"
PS C:\> Add-SCVMHost -ComputerName "ESXHost01.Contoso.com" -Credential $RunAsAccount -VirtualizationManager $VirtMgr -VMHostGroup $HostGroup

Example Example 5: Add a Citrix XenServer host to VMM.

The first command gets the host group object named HostGroup04, and then stores the object in the $HostGroup variable.

The second command gets the Run As account object named XenServer Host Computer Acct, and then stores the object in the $RunAsAccount variable. The required credentials for this operation are an account with root credentials on the XenServer host.

The third command gets the certificate object for XenServerHost01, and then stores the object in the $Certificate variable.

The last command adds a XenServer as a host to HostGroup04 in VMM and provides the credentials in the form of a Run As account stored in $RunAsAccount, which is required to add this host to VMM.

PS C:\> $HostGroup = Get-SCVMHostGroup -Name "HostGroup04"
PS C:\> $RunAsAccount = Get-SCRunAsAccount -Name "XenServer Run As Acct"
PS C:\> $Certificate = Get-SCCertificate -ComputerName "XenServerHost01.Contoso.com"
PS C:\> Add-SCVMHost -ComputerName "XenServerHost01.Contoso.com" -Credential $RunAsAccount -VMHostGroup $HostGroup -XenServerHost -Certificate $Certificate -EnableSecureMode $True -TCPPort 5989

関連トピック

Get-SCVMHost

Get-SCVMHostCluster

Get-SCVMHostGroup

Move-SCVMHost

New-SCVirtualMachine

Read-SCVMHost

Remove-SCVMHost

Set-SCVMHost

Restart-SCJob

Get-SCCertificate

Get-SCRunAsAccount