Get-AzAdvisorRecommendation
Obtains details of a cached recommendation.
Syntax
ListByFilter (Default)
Get-AzAdvisorRecommendation
[-SubscriptionId <String[]>]
[-Filter <String>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
ListById
Get-AzAdvisorRecommendation
-ResourceId <String>
[-SubscriptionId <String[]>]
[-Category <String>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
ListByName
Get-AzAdvisorRecommendation
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-Category <String>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
GetById
Get-AzAdvisorRecommendation
-Id <String>
-ResourceUri <String>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
GetViaIdentity1
Get-AzAdvisorRecommendation
-InputObject <IAdvisorIdentity>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Description
Obtains details of a cached recommendation.
Examples
Example 1: List Recommendation by subscriptionId and resource group name
Get-AzAdvisorRecommendation -ResourceGroupName lnxtest -Category HighAvailability
Name Category Resource Group Impact ImpactedValue ImpactedField
---- -------- -------------- ------ ------------- -------------
71411b72-e7de-9dc2-308b-5c60252e1456 HighAvailability lnxtest Medium lnxtest-vnet MICROSOFT.NETWORK/VIRTUALNETWORKS
bf8ebdfd-6caa-9f55-53ae-ffafefbf3a7c HighAvailability lnxtest Medium advisortest MICROSOFT.NETWORK/VIRTUALNETWORKS
339071fa-d66a-be4f-9cf8-22b67552b287 HighAvailability lnxtest Medium advisor-test MICROSOFT.NETWORK/VIRTUALNETWORKS
List Recommendation by subscriptionId
Example 2: List Recommendation by subscriptionId and filter
Get-AzAdvisorRecommendation -filter "Category eq 'HighAvailability' and ResourceGroup eq 'lnxtest'"
Name Category Resource Group Impact ImpactedValue ImpactedField
---- -------- -------------- ------ ------------- -------------
71411b72-e7de-9dc2-308b-5c60252e1456 HighAvailability lnxtest Medium lnxtest-vnet MICROSOFT.NETWORK/VIRTUALNETWORKS
bf8ebdfd-6caa-9f55-53ae-ffafefbf3a7c HighAvailability lnxtest Medium advisortest MICROSOFT.NETWORK/VIRTUALNETWORKS
339071fa-d66a-be4f-9cf8-22b67552b287 HighAvailability lnxtest Medium advisor-test MICROSOFT.NETWORK/VIRTUALNETWORKS
List Recommendation by subscriptionId and filter
Example 3: Get Recommendation by Id and resource Id
Get-AzAdvisorRecommendation -Id 42963553-61de-5334-2d2e-47f3a0099d41 -ResourceUri /subscriptions/9e223dbe-3399-4e19-88eb-0975f02ac87f
Name Category Resource Group Impact ImpactedValue ImpactedField
---- -------- -------------- ------ ------------- -------------
42963553-61de-5334-2d2e-47f3a0099d41 Security automanagehcrprg High arcbox-capi-mgmt Microsoft.Compute/virtualMachines
Get Recommendation by Id and resource Id
Parameters
-Category
The category of recommendation.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ListById
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ListByName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-DefaultProfile
The credentials, account, tenant, and subscription used for communication with Azure.
Parameter properties
Type: PSObject
Default value: None
Supports wildcards: False
DontShow: False
Aliases: AzureRMContext, AzureCredential
Parameter sets
(All)
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Filter
The filter to apply to the recommendations.
Filter can be applied to properties ['ResourceId', 'ResourceGroup', 'RecommendationTypeGuid', 'Category'] with operators ['eq', 'and', 'or'].
Example:
$filter=Category eq 'Cost' and ResourceGroup eq 'MyResourceGroup'
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ListByFilter
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-Id
The recommendation ID.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
GetById
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
Identity Parameter
To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: IAdvisorIdentity
Default value: None
Supports wildcards: False
DontShow: False
GetViaIdentity1
Position: Named
Mandatory: True
Value from pipeline: True
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceGroupName
The resource group name.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ListByName
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceId
The resource Id.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
ListById
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-ResourceUri
The fully qualified Azure Resource Manager identifier of the resource to which the recommendation applies.
Parameter properties
Type: String
Default value: None
Supports wildcards: False
DontShow: False
Parameter sets
GetById
Position: Named
Mandatory: True
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
-SubscriptionId
The Azure subscription ID.
Parameter properties
Type: String [ ]
Default value: (Get-AzContext).Subscription.Id
Supports wildcards: False
DontShow: False
Parameter sets
ListByFilter
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ListById
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
ListByName
Position: Named
Mandatory: False
Value from pipeline: False
Value from pipeline by property name: False
Value from remaining arguments: False
CommonParameters
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable,
-InformationAction, -InformationVariable, -OutBuffer, -OutVariable, -PipelineVariable,
-ProgressAction, -Verbose, -WarningAction, and -WarningVariable. For more information, see
about_CommonParameters .
Outputs