Add-SilVMHost
Add-SilVMHost
Adds and updates host information in the Software Inventory Logging Aggregator database.
Sintaxe
Parameter Set: DataCenterName
Add-SilVMHost [[-VMHostName] <String[]> ] -HostCredential <PSCredential> [-Force] [-SCVMMTargetName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: VMHostName
Add-SilVMHost -HostCredential <PSCredential> -VMHostName <String[]> [-Force] [-HostType <String> ] [-HypervisorType <System.String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Parameter Set: VMWareTarget
Add-SilVMHost [[-VMHostName] <String[]> ] -HostCredential <PSCredential> [-Force] [-VMWareTargetName <String> ] [-Confirm] [-WhatIf] [ <CommonParameters>]
Descrição detalhada
The Add-SilVMHost cmdlet adds and updates host information in the Software Inventory Logging Aggregator database. This information includes fully qualified domain name (FQDN), hypervisor manufacturer, and credentials. When a host name already exists in the database, the cmdlet updates the host type and hypervisor for that host, and logs existing host names in Event Viewer.
This cmdlet can get the host information from a management server and store that information in the Software Inventory Logging Aggregator database. This cmdlet supports SCVMM and VMWare management servers.
Parâmetros
-Force
Força a execução do comando sem solicitar a confirmação do usuário.
Aliases |
none |
Obrigatório? |
false |
Posição? |
named |
Valor padrão |
none |
Aceitar entrada de pipeline? |
false |
Aceitar caracteres curinga? |
false |
-HostCredential<PSCredential>
Specifies the credentials that allow this cmdlet to connect to the host. To obtain a PSCredential object, use the Get-Credential cmdlet. For more information, type Get-Help Get-Credential
.
Aliases |
none |
Obrigatório? |
true |
Posição? |
named |
Valor padrão |
none |
Aceitar entrada de pipeline? |
false |
Aceitar caracteres curinga? |
false |
-HostType<String>
Specifies the type of the host. Os valores aceitáveis para esse parâmetro são:
--Windows
-- VMware
-- Ubuntu
-- OpenSuse
-- Centos
-- Citrix
This cmdlet automatically detects host type, therefore, this parameter is not necessary.
Aliases |
none |
Obrigatório? |
false |
Posição? |
named |
Valor padrão |
none |
Aceitar entrada de pipeline? |
false |
Aceitar caracteres curinga? |
false |
-HypervisorType<System.String>
Specifies the type of the hypervisor. Os valores aceitáveis para esse parâmetro são:
-- HyperV
-- Esxi
-- Xen
--XenServer
-- KVM
This cmdlet automatically detects hypervisor, therefore, this parameter is not necessary.
Aliases |
none |
Obrigatório? |
false |
Posição? |
named |
Valor padrão |
none |
Aceitar entrada de pipeline? |
false |
Aceitar caracteres curinga? |
false |
-SCVMMTargetName<String>
Specifies the name of an SCVMM management server.
Aliases |
none |
Obrigatório? |
false |
Posição? |
named |
Valor padrão |
none |
Aceitar entrada de pipeline? |
false |
Aceitar caracteres curinga? |
false |
-VMHostName<String[]>
Specifies an array of virtual machine host names to add or update.
Aliases |
none |
Obrigatório? |
true |
Posição? |
named |
Valor padrão |
none |
Aceitar entrada de pipeline? |
true(ByValue) |
Aceitar caracteres curinga? |
false |
-VMWareTargetName<String>
Specifies the name of a VMWare management or vCenter server.
Aliases |
none |
Obrigatório? |
false |
Posição? |
named |
Valor padrão |
none |
Aceitar entrada de pipeline? |
false |
Aceitar caracteres curinga? |
false |
-Confirm
Solicita confirmação antes de executar o cmdlet.
Obrigatório? |
false |
Posição? |
named |
Valor padrão |
false |
Aceitar entrada de pipeline? |
false |
Aceitar caracteres curinga? |
false |
-WhatIf
Mostra o que ocorreria se o cmdlet fosse executado. O cmdlet não é executado.
Obrigatório? |
false |
Posição? |
named |
Valor padrão |
false |
Aceitar entrada de pipeline? |
false |
Aceitar caracteres curinga? |
false |
<CommonParameters>
Esse cmdlet oferece suporte aos parâmetros comuns: -Verbose, -Debug, -ErrorAction, -ErrorVariable, -OutBuffer e -OutVariable. Para obter mais informações, consulte about_CommonParameters (https://go.microsoft.com/fwlink/p/?LinkID=113216).
Entradas
O tipo de entrada é o tipo dos objetos que você pode redirecionar para o cmdlet.
Saídas
O tipo de saída é o tipo de objeto que o cmdlet emite.
Exemplos
Example 1: Add host names to the database with credentials
The first command creates a credential by using the Get-Credential cmdlet. That cmdlet prompts you for user name and password. The command stores those credentials in the $Credentials variable. For more information, type Get-Help Get-Credential
.
The second command identifies host type and hypervisor type. The command stores host names, host type, hypervisor type in the database. The command also updates host credentials in Credential Manager.
PS C:\> $Credential = Get-Credential
PS C:\> Add-SilVMHost -VMHostName "Host01","Host02","Host03" -HostCredential $Credential
Example 2: Get information for hosts managed by an SCVMM management server
This command gets the host information for hosts managed by an SCVMM management server. This command stores that host information in the database, and updates host credentials in Credential Manager.
PS C:\> Add-SilVMHost -HostCredential $Credential -SCVMMTargetName "ManagementServer.tsqa.contoso.com"
Example 3: Get information for hosts managed by a VMWare management server
This command gets the host information for hosts managed by a VMWare management or vCenter server. This command stores that host information in the database, and updates host credentials in Credential Manager.
PS C:\> Add-SilVMHost -HostCredential $Credential -VMWareTargetName "ManagementServer.tsqa.contoso.com"