< Back
Set-AzureRmPolicySetDefinition
Post
NAME Set-AzureRmPolicySetDefinition
SYNOPSIS
Modifies a policy set definition
SYNTAX
Set-AzureRmPolicySetDefinition [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-Description <String>] [-DisplayName <String>]
-Id <String> [-PolicyDefinition <String>] [-Pre] [-Confirm] [-WhatIf] [<CommonParameters>]
Set-AzureRmPolicySetDefinition [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-Description <String>] [-DisplayName <String>]
-Name <String> [-PolicyDefinition <String>] [-Pre] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Set-AzureRmPolicySetDefinition cmdlet modifies a policy 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
-Id <String>
The fully qualified policy definition Id, including the subscription. e.g. /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}
Required? true
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
-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? false
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: Update the description of a policy set definition
PS C:\\>$PolicySetDefinition = Get-AzureRmPolicySetDefinition -ResourceId
"/subscriptions/mySub/Microsoft.Authorization/policySetDefinitions/myPSSetDefinition"
PS C:\\> Set-AzureRmPolicySetDefinition -Id $PolicySetDefinition.ResourceId -Description "Updated policy to not allow virtual machine creation"
The first command gets a policy set definition by using the Get-AzureRmPolicySetDefinition cmdlet. The command stores that object in the
$PolicySetDefinition variable.
The second command updates the description of the policy set definition identified by the ResourceId property of $PolicySetDefinition.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... definition
SYNOPSIS
Modifies a policy set definition
SYNTAX
Set-AzureRmPolicySetDefinition [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-Description <String>] [-DisplayName <String>]
-Id <String> [-PolicyDefinition <String>] [-Pre] [-Confirm] [-WhatIf] [<CommonParameters>]
Set-AzureRmPolicySetDefinition [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-Description <String>] [-DisplayName <String>]
-Name <String> [-PolicyDefinition <String>] [-Pre] [-Confirm] [-WhatIf] [<CommonParameters>]
DESCRIPTION
The Set-AzureRmPolicySetDefinition cmdlet modifies a policy 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
-Id <String>
The fully qualified policy definition Id, including the subscription. e.g. /subscriptions/{subscriptionId}/resourcegroups/{resourceGroupName}
Required? true
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
-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? false
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: Update the description of a policy set definition
PS C:\\>$PolicySetDefinition = Get-AzureRmPolicySetDefinition -ResourceId
"/subscriptions/mySub/Microsoft.Authorization/policySetDefinitions/myPSSetDefinition"
PS C:\\> Set-AzureRmPolicySetDefinition -Id $PolicySetDefinition.ResourceId -Description "Updated policy to not allow virtual machine creation"
The first command gets a policy set definition by using the Get-AzureRmPolicySetDefinition cmdlet. The command stores that object in the
$PolicySetDefinition variable.
The second command updates the description of the policy set definition identified by the ResourceId property of $PolicySetDefinition.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... definition