Edit

Share via


Clear-HgsServer

Resets the Host Guardian Service on the local node to the uninitialized state.

Syntax

Default (Default)

Clear-HgsServer
    [[-ClusterName] <String>]
    [-Force]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Clear-HgsServer cmdlet removes a local node from the Host Guardian Service (HGS).

This cmdlet makes the following infrastructure component changes on the additional HGS node:

  • Unregisters the Attestation service web application with the IIS service.
  • Unregisters the Key Protection service web application with the IIS service.
  • Disables Just Enough Administration on the local node.
  • Removes the local node from the existing failover cluster.

This cmdlet makes the following infrastructure components changes on the last HGS node:

  • Unregisters the Attestation service web application with the IIS service.
  • Unregisters the Key Protection service web application with the IIS service.
  • Removes the Distributed Network Name resource corresponding to the Host Guardian Service name.
  • Disables Just Enough Administration on the local node.
  • Destroys the cluster on the local node.

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

Examples

Example 1: Clear all cluster initialization settings from the local node

PS C:\> Clear-HgsServer

This command returns the HGS Server on the local node to a clean state to prepare it for the Initialize-HgsServer command.

Example 2: Clear all cluster initialization settings from the local node without confirmation

PS C:\> Clear-HgsServer -Force -Confirm:$False

This command returns the HGS Server on the local node to a clean state to prepare it for the Initialize-HgsServer command and does not prompt for confirmation.

Parameters

-ClusterName

Specifies a cluster name.

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

-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

-Force

Forces the command to run without asking for user confirmation.

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

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