Skip to content

Properties

SYNOPSIS

Policy metadata: DisplayName, Description, Category, Version, PolicyVersion, Mode, Preview, Deprecated, Metadata.

SYNTAX

Properties [-Values] <IDictionary> [<CommonParameters>]

DESCRIPTION

DisplayName, Description, Category, Version, PolicyVersion and Mode are strings; Preview and Deprecated are $true or $false; Metadata is a hashtable of any other metadata. EPAC output needs Category and Version. Mode is All (the default) or Indexed. An initiative takes the same keys except Mode. Unknown keys fail the build.

Version is metadata.version. PolicyVersion is the top-level version of Azure's custom policy versioning, which is in preview; EPAC's schemas don't have it, so only plain JSON output writes it.

USED IN

Policy, Initiative

EXAMPLES

Example 1

Properties @{
    DisplayName = 'Storage accounts require TLS 1.2'
    Category    = 'Storage'
    Version     = '1.0.0'
    Mode        = 'Indexed'
}

Example 2

Properties @{
    DisplayName   = 'Storage accounts require TLS 1.2'
    Version       = '1.1.0'
    PolicyVersion = '1.0.0'
}

For plain JSON output: metadata.version is 1.1.0, and the definition's top-level version, which assignments and initiative members select with definitionVersion, is 1.0.0.

PARAMETERS

-Values

The properties, as a hashtable.

Type: IDictionary
Required: true
Position: 1
Accept pipeline input: false