Get-AzPolicyRemediation
Gets policy remediations.
Get-AzPolicyRemediation
[-Top <Int32>]
[-Filter <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzPolicyRemediation
-Name <String>
[-Scope <String>]
[-ManagementGroupName <String>]
[-ResourceGroupName <String>]
[-Top <Int32>]
[-IncludeDetail]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzPolicyRemediation
-Scope <String>
[-Top <Int32>]
[-Filter <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzPolicyRemediation
-ManagementGroupName <String>
[-Top <Int32>]
[-Filter <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzPolicyRemediation
-ResourceGroupName <String>
[-Top <Int32>]
[-Filter <String>]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
Get-AzPolicyRemediation
-ResourceId <String>
[-Top <Int32>]
[-IncludeDetail]
[-DefaultProfile <IAzureContextContainer>]
[<CommonParameters>]
The Get-AzPolicyRemediation cmdlet gets all policy remediations in a scope or a particular remediation.
Set-AzContext -Subscription "My Subscription"
Get-AzPolicyRemediation
This command gets all the remediations created at or underneath a subscription named 'My Subscription'.
Get-AzPolicyRemediation -ResourceGroupName "myResourceGroup" -Name "remediation1" -IncludeDetail
This command gets the remediation named 'remediation1' from resource group 'myResourceGroup'. The details of the resources being remediated will be included.
Get-AzPolicyRemediation -ManagementGroupName "mg1" -Top 10 -Filter "PolicyAssignmentId eq '/providers/Microsoft.Management/managementGroups/mg1/providers/Microsoft.Authorization/policyAssignments/pa1'"
This command gets a max of 10 policy remediations from a management group named 'mg1'. Only policy remediations for the given policy assignment will be retrieved.
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 |
Filter expression using OData notation.
Type: | String |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Include details of the deployments created by the remediation.
Type: | SwitchParameter |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Management group ID.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Resource name.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Resource group name.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Resource ID.
Type: | String |
Aliases: | Id |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Scope of the resource. For example, '/subscriptions/{subscriptionId}/resourceGroups/{rgName}'.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
Maximum number of records to return.
Type: | Int32 |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
Azure PowerShell feedback
Azure PowerShell is an open source project. Select a link to provide feedback: