< Back
Get-AzureRmPolicyDefinition
Post
NAME Get-AzureRmPolicyDefinition
SYNOPSIS
Gets policy definitions.
SYNTAX
Get-AzureRmPolicyDefinition [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] -Id <String> [-InformationAction <ActionPreference>]
[-InformationVariable <String>] [-Pre] [<CommonParameters>]
Get-AzureRmPolicyDefinition [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-InformationAction <ActionPreference>]
[-InformationVariable <String>] -Name <String> [-Pre] [<CommonParameters>]
DESCRIPTION
The Get-AzureRmPolicyDefinition cmdlet gets all the policy definitions or a specific policy definition identified by name or ID.
PARAMETERS
-ApiVersion <String>
Specifies the version of the resource provider API to use. If you do not specify a version, this cmdlet uses the latest available version.
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
-Id <String>
Specifies the fully qualified resource ID for the policy definition that this cmdlet gets.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-InformationAction <ActionPreference>
Specifies how this cmdlet responds to an information event.
The acceptable values for this parameter are:
- Continue
- Ignore
- Inquire
- SilentlyContinue
- Stop
- Suspend
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InformationVariable <String>
Specifies an information variable.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Name <String>
Specifies the name of the policy definition that this cmdlet gets.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Pre [<SwitchParameter>]
Indicates that this cmdlet considers pre-release API versions when it automatically determines which version to use.
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
None
This cmdlet does not accept any input.
OUTPUTS
System.Management.Automation.PSObject
NOTES
Example 1: Get all policy definition
PS C:\\>Get-AzureRmPolicyDefinition
This command gets all the policy definitions.
Example 2: Get policy definition by name
PS C:\\>Get-AzureRmPolicyDefinition -Name "VMPolicyDefinition"
This command gets the policy definition named VMPolicyDefinition.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... definition
New-AzureRmPolicyDefinition
Remove-AzureRmPolicyDefinition
Set-AzureRmPolicyDefinition
SYNOPSIS
Gets policy definitions.
SYNTAX
Get-AzureRmPolicyDefinition [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] -Id <String> [-InformationAction <ActionPreference>]
[-InformationVariable <String>] [-Pre] [<CommonParameters>]
Get-AzureRmPolicyDefinition [-ApiVersion <String>] [-DefaultProfile <IAzureContextContainer>] [-InformationAction <ActionPreference>]
[-InformationVariable <String>] -Name <String> [-Pre] [<CommonParameters>]
DESCRIPTION
The Get-AzureRmPolicyDefinition cmdlet gets all the policy definitions or a specific policy definition identified by name or ID.
PARAMETERS
-ApiVersion <String>
Specifies the version of the resource provider API to use. If you do not specify a version, this cmdlet uses the latest available version.
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
-Id <String>
Specifies the fully qualified resource ID for the policy definition that this cmdlet gets.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-InformationAction <ActionPreference>
Specifies how this cmdlet responds to an information event.
The acceptable values for this parameter are:
- Continue
- Ignore
- Inquire
- SilentlyContinue
- Stop
- Suspend
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-InformationVariable <String>
Specifies an information variable.
Required? false
Position? named
Default value None
Accept pipeline input? False
Accept wildcard characters? false
-Name <String>
Specifies the name of the policy definition that this cmdlet gets.
Required? true
Position? named
Default value None
Accept pipeline input? True (ByPropertyName)
Accept wildcard characters? false
-Pre [<SwitchParameter>]
Indicates that this cmdlet considers pre-release API versions when it automatically determines which version to use.
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
None
This cmdlet does not accept any input.
OUTPUTS
System.Management.Automation.PSObject
NOTES
Example 1: Get all policy definition
PS C:\\>Get-AzureRmPolicyDefinition
This command gets all the policy definitions.
Example 2: Get policy definition by name
PS C:\\>Get-AzureRmPolicyDefinition -Name "VMPolicyDefinition"
This command gets the policy definition named VMPolicyDefinition.
RELATED LINKS
Online Version: https://docs.microsoft.com/en-us/powers ... definition
New-AzureRmPolicyDefinition
Remove-AzureRmPolicyDefinition
Set-AzureRmPolicyDefinition