Edit

Share via


Install-HgsServer

Installs the Host Guardian Service server.

Syntax

PrimaryServer_HgsDomain (Default)

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

AdditionalServer

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.

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:cf

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-DatabasePath

Specifies a database path.

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

-HgsDomainCredential

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

Parameter properties

Type:PSCredential
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

AdditionalServer
Position:2
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-HgsDomainName

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

Parameter properties

Type:String
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:1
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-LogDirectory

Specifies the output log directory location.

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

-Restart

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

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

-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.

Parameter properties

Type:SecureString
Default value:None
Supports wildcards:False
DontShow:False

Parameter sets

(All)
Position:Named
Mandatory:True
Value from pipeline:False
Value from pipeline by property name:False
Value from remaining arguments:False

-WhatIf

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

Parameter properties

Type:SwitchParameter
Default value:False
Supports wildcards:False
DontShow:False
Aliases:wi

Parameter sets

(All)
Position:Named
Mandatory:False
Value from pipeline:False
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.