編集

次の方法で共有


Install-HgsServer

Installs the Host Guardian Service server.

Syntax

Install-HgsServer
       [-HgsDomainName] <String>
       -SafeModeAdministratorPassword <SecureString>
       [-Restart]
       [-LogDirectory <String>]
       [-DatabasePath <String>]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]
Install-HgsServer
       [-HgsDomainName] <String>
       [-HgsDomainCredential] <PSCredential>
       -SafeModeAdministratorPassword <SecureString>
       [-Restart]
       [-LogDirectory <String>]
       [-DatabasePath <String>]
       [-WhatIf]
       [-Confirm]
       [<CommonParameters>]

Description

The Install-HgsServer cmdlet configures infrastructure components necessary for the Host Guardian Service (HGS) that require reboot.

When this cmdlet is run on the first HGS node, it promotes the node to the primary domain controller for the specified domain. When this cmdlet is run on an additional HGS node, it promotes the node to a secondary domain controller for the specified domain.

A reboot is necessary for the infrastructure components configured by this cmdlet.

For more information about the scenario terms, see Security and Assurance.

Examples

Example 1: Install the HGS server on the current node and prompt for the administrator password

PS C:\> Install-HgsServer -HgsDomainName "Contoso.com" -SafeModeAdministratorPassword $SecureStringPassword

This command installs the HGS Server on the current node and configures it as the primary server.

Example 2: Install the HGS server on the current node as a security server and prompt for the administrator password

PS C:\> $Credential = Get-Credential
PS C:\> Install-HgsServer -HgsDomainName "Contoso.com" -SafeModeAdministratorPassword $SecureStringPassword -HgsDomainCredential $Credential

This command installs the HGS server and uses the current node as a security server.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DatabasePath

Specifies a database path.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-HgsDomainCredential

Specifies the Active Directory domain administrator credentials for the primary HGS server.

Type:PSCredential
Position:2
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-HgsDomainName

Specifies the name of the Active Directory domain for the HGS server.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-LogDirectory

Specifies the output log directory location.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Restart

Indicates that a system reboot is initiated after running this command.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-SafeModeAdministratorPassword

Specifies the password for the administrator account when the computer is started in Safe Mode or a variant of Safe Mode, such as Directory Services Restore Mode.

Type:SecureString
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-WhatIf

Shows what would happen if the cmdlet runs. The cmdlet is not run.

Type:SwitchParameter
Aliases:wi
Position:Named
Default value:False
Required:False
Accept pipeline input:False
Accept wildcard characters:False