< Back

New-AzureRmPolicySetDefinition

Tue Jan 29, 2019 10:05 pm

NAME New-AzureRmPolicySetDefinition



SYNOPSIS

Creates a policy set definition.





SYNTAX

New-AzureRmPolicySetDefinition [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-Description <String>] [-DisplayName <String>]

[-Metadata <String>] -Name <String> [-Parameter <String>] -PolicyDefinition <String> [-Pre] [-Confirm] [-WhatIf] [<CommonParameters>]





DESCRIPTION

The New-AzureRmPolicySetDefinition cmdlet creates a policy set definition.





PARAMETERS

-ApiVersion <String>

When set, indicates the version of the resource provider API to use. If not specified, the API version is automatically determined as the

latest available.



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-DefaultProfile <IAzureContextContainer>

The credentials, account, tenant, and subscription used for communication with azure



Required? false

Position? named

Default value None

Accept pipeline input? False

Accept wildcard characters? false



-Description <String>

The description for policy set definition.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-DisplayName <String>

The display name for policy set definition.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Metadata <String>

The metadata for policy set definition. This can either be a path to a file name containing the metadata, or the metadata as string



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Name <String>

The policy set definition name.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Parameter <String>

The parameters declaration for policy set definition. This can either be a path to a file name containing the parameters declaration, or the

parameters declaration as string.



Required? false

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-PolicyDefinition <String>

The policy set definition. This can either be a path to a file name containing the policy definitions, or the policy set definition as string.



Required? true

Position? named

Default value None

Accept pipeline input? True (ByPropertyName)

Accept wildcard characters? false



-Pre [<SwitchParameter>]

When set, indicates that the cmdlet should use pre-release API versions when automatically determining which version to use.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-Confirm [<SwitchParameter>]

Prompts you for confirmation before running the cmdlet.



Required? false

Position? named

Default value False

Accept pipeline input? False

Accept wildcard characters? false



-WhatIf [<SwitchParameter>]

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: Verbose, Debug,

ErrorAction, ErrorVariable, WarningAction, WarningVariable,

OutBuffer, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (http://go.microsoft.com/fwlink/?LinkID=113216).



INPUTS

System.String







OUTPUTS

System.Management.Automation.PSObject







NOTES









Example 1: Create a policy set definition by using a policy set file



PS C:\\>New-AzureRmPolicySetDefinition -Name "VMPolicyDefinition" -PolicyDefinition C:\\VMPolicySet.json



This command creates a policy set definition named VMPolicyDefinition that contains the policy definitions specified in C:\\VMPolicy.json.







RELATED LINKS

Online Version: https://docs.microsoft.com/en-us/powers ... definition