Add-HgsAttestationCIPolicy

Add-HgsAttestationCIPolicy

Adds a Code Integrity-based attestation policy in HGS.

Syntax

Parameter Set: Console
Add-HgsAttestationCIPolicy [-InputObject] <Byte[]> -Name <String> [-Confirm] [-WhatIf] [ <CommonParameters>]

Parameter Set: File
Add-HgsAttestationCIPolicy [-Path] <String> -Name <String> [-Confirm] [-WhatIf] [ <CommonParameters>]

Detailed Description

The Add-HgsAttestationCIPolicy cmdlet adds a Code Integrity-based attestation policy to the Attestation service in the Host Guardian Service (HGS). Specify a Public-Key Cryptography Standards #7 format (.p7b file) file or the contents of a .p7b file.

Parameters

-InputObject<Byte[]>

Specifies the contents of a .p7b file on which this cmdlet bases a policy.

Aliases

none

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true(ByValue)

Accept Wildcard Characters?

false

-Name<String>

Aliases

none

Required?

true

Position?

named

Default Value

none

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-Path<String>

Specifies the path of the .p7b file on which this cmdlet bases a policy.

Aliases

FilePath

Required?

true

Position?

1

Default Value

none

Accept Pipeline Input?

true(ByValue)

Accept Wildcard Characters?

false

-Confirm

Prompts you for confirmation before running the cmdlet.

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

-WhatIf

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

Required?

false

Position?

named

Default Value

false

Accept Pipeline Input?

false

Accept Wildcard Characters?

false

<CommonParameters>

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see    about_CommonParameters.

Inputs

The input type is the type of the objects that you can pipe to the cmdlet.

  • String

Outputs

The output type is the type of the objects that the cmdlet emits.

  • AttestationPolicyInfo

    This cmdlet returns attestation policy information.

Examples

Example 1: Add a policy to the Attestation service

This command adds a Code Integrity policy to the Attestation service, based on the specified .p7b file.

PS C:\> Add-HgsAttestationCIPolicy -Path ".\CodeIntegrity.p7b" -Name "CiPolicy21" 

Add-HgsAttestationTpmPolicy