Test-HgsServer
Tests if the local computer can function as a Host Guardian Service server node.
Syntax
PrimaryServer_HgsDomain (Default)
Test-HgsServer
[[-HgsDomainName] <String>]
[-SafeModeAdministratorPassword <SecureString>]
[-LogDirectory <String>]
[-DatabasePath <String>]
[<CommonParameters>]
AdditionalServer
Test-HgsServer
[[-HgsDomainName] <String>]
[-HgsDomainCredential] <PSCredential>
[-HgsServerIPAddress] <String>
[-SafeModeAdministratorPassword <SecureString>]
[-LogDirectory <String>]
[-DatabasePath <String>]
[<CommonParameters>]
Description
The Test-HgsServer cmdlet obtains information about the features, configuration, and state of the local computer, and compares it with the recommended settings to determine whether it can function as a Host Guardian Service (HGS) server node.
The following checks are performed, when applicable:
- HostGuardianServiceRole installation integrity
- BitLocker is enabled on the operating system drive
- SecureBoot is enabled
- Static IP addresses are configured
- Whether a restart is pending
- Prerequisites for installing a new forest or domain controller in Active Directory, this includes a test report
- Active Directory trust settings
- Validation tests for failover cluster hardware and settings
- Attestation application pool state
- Key Protection application pool state
For more information about the scenario terms, see Security and Assurance.
Examples
Example 1: Test the first HGS node
PS C:\> Test-HgsServer -HgsDomainName "Contoso.private"
This command tests whether the local computer can be used as the first HGS node.
Example 2: Test an additional HGS node
PS C:\> $Cred = Get-Credential
PS C:\> Test-HgsServer -HgsDomainName "Contoso.private" -HgsServerIPAddress "100.100.100.1" -HgsDomainCredential $Cred
This command tests whether the local computer can be used as an additional HGS node.
Parameters
-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: | False |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-HgsServerIPAddress
Specifies the network IP address for the HGS server.
Parameter properties
| Type: | String |
| Default value: | None |
| Supports wildcards: | False |
| DontShow: | False |
Parameter sets
AdditionalServer
| Position: | 3 |
| Mandatory: | True |
| Value from pipeline: | False |
| Value from pipeline by property name: | False |
| Value from remaining arguments: | False |
-LogDirectory
Specifies the output log directory.
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 |
-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: | 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.