你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
Get-AzElasticMonitor
Get the properties of a specific monitor resource.
Syntax
Get-AzElasticMonitor
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzElasticMonitor
-Name <String>
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzElasticMonitor
-ResourceGroupName <String>
[-SubscriptionId <String[]>]
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Get-AzElasticMonitor
-InputObject <IElasticIdentity>
[-DefaultProfile <PSObject>]
[<CommonParameters>]
Description
Get the properties of a specific monitor resource.
Examples
Example 1: List all elastic monitors under a subscription
Get-AzElasticMonitor
Name SkuName MonitoringStatus Location ResourceGroupName
---- ------- ---------------- -------- -----------------
kk-elastictest02 ess-consumption-2024_Monthly Enabled westus2 kk-rg
kk-elastictest03 ess-consumption-2024_Monthly Enabled westus2 kk-rg
wusDeployValidate ess-consumption-2024_Monthly Enabled westus2 poshett-rg
poshett-WestUS2-01 staging_Monthly Enabled westus2 poshett-rg
hashahdemo01 staging_Monthly Enabled westus2 test-sub
This command lists all elastic monitors under a subscription.
Example 2: List all elastic monitors under a resource group
Get-AzElasticMonitor -ResourceGroupName azure-elastic-test
Name SkuName MonitoringStatus Location ResourceGroupName
---- ------- ---------------- -------- -----------------
elastic-portal01 ess-consumption-2024_Monthly Enabled westus2 azure-elastic-test
elastic-portal02 ess-consumption-2024_Monthly Enabled westus2 azure-elastic-test
elastic-pwsh01 ess-consumption-2024_Monthly Enabled westus2 azure-elastic-test
elastic-pwsh02 ess-consumption-2024_Monthly Enabled westus2 azure-elastic-test
This command lists all elastic monitors under a resource group.
Example 3: Get the properties of a specific monitor resource
Get-AzElasticMonitor -ResourceGroupName azure-elastic-test -Name elastic-pwsh02
Name SkuName MonitoringStatus Location ResourceGroupName
---- ------- ---------------- -------- -----------------
elastic-pwsh02 ess-consumption-2024_Monthly Enabled westus2 azure-elastic-test
This command gets the properties of a specific monitor resource.
Example 4: Get the properties of a specific monitor resource by pipeline
New-AzElasticMonitor -ResourceGroupName azps-elastic-test -Name elastic-pwsh02 -Location "westus2" -Sku "ess-consumption-2024_Monthly" -UserInfoEmailAddress 'xxx@microsoft.com' | Get-AzElasticMonitor
Name SkuName MonitoringStatus Location ResourceGroupName
---- ------- ---------------- -------- -----------------
elastic-pwsh02 ess-consumption-2024_Monthly Enabled westus2 azure-elastic-test
This command gets the properties of a specific monitor resource by pipeline.
Parameters
-DefaultProfile
The DefaultProfile parameter is not functional. Use the SubscriptionId parameter when available if executing the cmdlet against a different subscription.
Type: | PSObject |
Aliases: | AzureRMContext, AzureCredential |
Position: | Named |
Default value: | None |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-InputObject
Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
Type: | IElasticIdentity |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | True |
Accept wildcard characters: | False |
-Name
Monitor resource name
Type: | String |
Aliases: | MonitorName |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-ResourceGroupName
The name of the resource group to which the Elastic resource belongs.
Type: | String |
Position: | Named |
Default value: | None |
Required: | True |
Accept pipeline input: | False |
Accept wildcard characters: | False |
-SubscriptionId
The Azure subscription ID. This is a GUID-formatted string (e.g. 00000000-0000-0000-0000-000000000000)
Type: | String[] |
Position: | Named |
Default value: | (Get-AzContext).Subscription.Id |
Required: | False |
Accept pipeline input: | False |
Accept wildcard characters: | False |