Uninstall-HgsServer
Removes a local node from a Host Guardian Service and from the domain.
Syntax
Uninstall-HgsServer
[-LocalAdministratorPassword] <SecureString>
[-HgsDomainCredential <PSCredential>]
[-Force]
[-Restart]
[-WhatIf]
[-Confirm]
[<CommonParameters>]
Description
The Uninstall-HgsServer cmdlet removes a local node from a Host Guardian Service (HGS).
This cmdlet makes the following configuration changes in order to remove the HGS configuration from 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.
- Removes the local node from being a domain controller.
This cmdlet makes the following configuration changes in order to remove the HGS configuration from 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 (DNN) resource corresponding to the HGS name.
- Disables Just Enough Administration on the local node.
- Destroys the cluster on the local node.
- Removes the local node from being a domain controller and removes the HGS domain.
For more information about the scenario terms, see Security and Assurance.
Examples
Example 1: Remove the node from HGS
PS C:\> $Cred = Get-Credential
PS C:\> Uninstall-HgsServer -HgsDomainCredential $cred -LocalAdministratorPassword $secureString
This example removes the node from an existing HGS setup. If the second command removes the final node, then it also destroys the cluster.
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 |
-Force
Forces the command to run without asking for user confirmation.
Type: | SwitchParameter |
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: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-LocalAdministratorPassword
Specifies the password for the local administrator account when the computer is no longer a domain controller.
Type: | SecureString |
Position: | 1 |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-Restart
Indicates that a reboot is initiated automatically after running this command.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
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 |
Related Links
Commentaires
https://aka.ms/ContentUserFeedback.
Bientôt disponible : Tout au long de 2024, nous allons supprimer progressivement GitHub Issues comme mécanisme de commentaires pour le contenu et le remplacer par un nouveau système de commentaires. Pour plus d’informations, consultezEnvoyer et afficher des commentaires pour