Set-AzAttestationPolicy

Sets the policy from a tenant in Azure Attestationn.

Syntax

Set-AzAttestationPolicy
   [-Name] <String>
   [-ResourceGroupName] <String>
   -Tee <String>
   -Policy <String>
   [-PolicyFormat <String>]
   [-PassThru]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]
Set-AzAttestationPolicy
   [-ResourceId] <String>
   -Tee <String>
   -Policy <String>
   [-PolicyFormat <String>]
   [-PassThru]
   [-DefaultProfile <IAzureContextContainer>]
   [-WhatIf]
   [-Confirm]
   [<CommonParameters>]

Description

The Set-AzAttestationPolicy cmdlet sets the policy from a tenant in Azure Attestation.

Examples

Example 1

$policy = Get-Content -Path .\custom.sgx.policy.txt
Set-AzAttestationPolicy -Name pshtest -ResourceGroupName psh-test-rg -Tee SgxEnclave -Policy $policy

Sets the user defined policy for TEE type SgxEnclave for Attestation Provider pshtest using a text policy format (default).

Example 2

$policyjwt = Get-Content -Path .\custom.sgx.policy.jwt.format.txt
Set-AzAttestationPolicy -Name pshtest -ResourceGroupName psh-test-rg -Tee SgxEnclave -Policy $policyjwt -PolicyFormat JWT

Sets the user defined policy for TEE type SgxEnclave for Attestation Provider pshtest using a JWT policy format.

Parameters

-Confirm

Prompts you for confirmation before running the cmdlet.

Type:SwitchParameter
Aliases:cf
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

The credentials, account, tenant, and subscription used for communication with Azure.

Type:IAzureContextContainer
Aliases:AzContext, AzureRmContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Name

Specifies a name of the tenant. This cmdlet sets the attestation policy for the tenant that this parameter specifies.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-PassThru

This Cmdlet does not return an object by default. If this switch is specified, it returns true if successful.

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Policy

Specifies the policy document to set. The policy format can be either Text or JSON Web Token (JWT).

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-PolicyFormat

Specifies the format for the policy, either Text or JWT (JSON Web Token). The default policy format is Text.

Type:String
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

Specifies the resource group name of an attestation provider.

Type:String
Position:1
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-ResourceId

Specifies the ResourceID of an attestation provider.

Type:String
Position:0
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Tee

Specifies a type of Trusted Execution Environment. Four types of environment are supported: SgxEnclave, OpenEnclave, CyResComponent and VBSEnclave.

Type:String
Position:Named
Default value:None
Required:True
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:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

Inputs

String

Outputs

String