Edit

Share via


Import-HgsServerState

Imports an exported Host Guardian Service state into a Host Guardian Service instance.

Syntax

XML

Import-HgsServerState
    [[-XML] <XmlDocument>]
    -Password <SecureString>
    [-ImportTpmModeState]
    [-ImportActiveDirectoryModeState]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

File

Import-HgsServerState
    [[-Path] <String>]
    -Password <SecureString>
    [-ImportTpmModeState]
    [-ImportActiveDirectoryModeState]
    [-WhatIf]
    [-Confirm]
    [<CommonParameters>]

Description

The Import-HgsServer cmdlet imports the previously exported Host Guardian Service (HGS) state to the existing Host Guardian Service instance.

The cmdlet imports the following Host Guardian Service state from the input file:

  • Attestation service policies
  • Attestation service configuration data
  • Key protection policies
  • Key protection configuration data
  • Key Protection Signer Certificates and private keys
  • Key Protection Encryption Certificates and private keys

Additionally, this cmdlet renews the attestation service signer certificate and updates the key protection service instance with this certificate.

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

Examples

Example 1: Import HGS state data

PS C:\> Import-HgsServerState -Path "C:\ExportedHgsServerState.xml" -Password $Pass

This command imports previously exported state on the current HGS server. This command can be called on only one node. The state is automatically replicated to other nodes in the HGS server setup.

The exported state is the output generated from Export-HgsServerState when run against an existing HGS server setup. The password specified must match the password that was passed to Export-HgsServerState.

Use ConvertTo-SecureString to generate a secure string that represents the password.

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

-ImportActiveDirectoryModeState

Indicates that this cmdlet imports and updates Attestation service configuration state relevant to the Active Directory operational mode.

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

-ImportTpmModeState

Indicates that this cmdlet imports and updates Attestation service configuration state relevant to the trusted platform module (TPM) operational mode.

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

-Password

Specifies the password that the Export-HgsServerState cmdlet used to encrypt the keys.

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

-Path

Specifies the path of the file that this cmdlet imports.

Parameter properties

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

Parameter sets

File
Position:1
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

-XML

Specifies the state that this cmdlet imports as an XML document.

Parameter properties

Type:XmlDocument
Default value:None
Supports wildcards:False
DontShow:False
Aliases:InputObject

Parameter sets

XML
Position:1
Mandatory:False
Value from pipeline:True
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.