你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn

Get-AzApplicationInsightsWebTest

获取特定的 Application Insights Web 测试定义。

语法

Get-AzApplicationInsightsWebTest
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzApplicationInsightsWebTest
   -Name <String>
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzApplicationInsightsWebTest
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   -AppInsightsName <String>
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzApplicationInsightsWebTest
   -ResourceGroupName <String>
   [-SubscriptionId <String[]>]
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]
Get-AzApplicationInsightsWebTest
   -InputObject <IApplicationInsightsIdentity>
   [-DefaultProfile <PSObject>]
   [<CommonParameters>]

说明

获取特定的 Application Insights Web 测试定义。

示例

示例 1:列出订阅下的所有 Application Insights Web 测试

Get-AzApplicationInsightsWebTest

Name                                 Location WebTestKind ResourceGroupName
----                                 -------- ----------- -----------------
bsaic-portal-appinsights-portal01    westus2  ping        azpwsh-rg-test
basic-portal02-appinsights-portal01  westus2  ping        azpwsh-rg-test
basic-portal03-appinsights-portal01  westus2  ping        azpwsh-rg-test
standard-portal-appinsights-portal01 westus2  standard    azpwsh-rg-test
standard-pwsh01                      westus2  standard    azpwsh-rg-test

此命令列出订阅下的所有 Application Insights Web 测试。

示例 2:列出资源组下的所有 Application Insights Web 测试

Get-AzApplicationInsightsWebTest -ResourceGroupName azpwsh-rg-test

Name                                 Location WebTestKind ResourceGroupName
----                                 -------- ----------- -----------------
bsaic-portal-appinsights-portal01    westus2  ping        azpwsh-rg-test
basic-portal02-appinsights-portal01  westus2  ping        azpwsh-rg-test
basic-portal03-appinsights-portal01  westus2  ping        azpwsh-rg-test
standard-portal-appinsights-portal01 westus2  standard    azpwsh-rg-test
standard-pwsh01                      westus2  standard    azpwsh-rg-test

此命令列出资源组下的所有 Application Insights Web 测试。

示例 3:列出特定 Application Insights 下的所有 Application Insights Web 测试

Get-AzApplicationInsightsWebTest -ResourceGroupName azpwsh-rg-test -AppInsightsName appinsights-portal01

Name                                 Location WebTestKind ResourceGroupName   Enabled
----                                 -------- ----------- -----------------   -------
bsaic-portal-appinsights-portal01    westus2  ping        azpwsh-rg-test      True
basic-portal02-appinsights-portal01  westus2  ping        azpwsh-rg-test      True
basic-portal03-appinsights-portal01  westus2  ping        azpwsh-rg-test      True
standard-portal-appinsights-portal01 westus2  standard    azpwsh-rg-test      True
standard-pwsh01                      westus2  standard    azpwsh-rg-test      True

此命令列出特定 Application Insights 下的所有 Application Insights Web 测试。

示例 4:获取特定的 Application Insights Web 测试定义

Get-AzApplicationInsightsWebTest -ResourceGroupName azpwsh-rg-test -Name standard-pwsh01

Name            Location WebTestKind ResourceGroupName  Enabled
----            -------- ----------- -----------------  -------
standard-pwsh01 westus2  standard    azpwsh-rg-test     True

此命令获取特定的 Application Insights Web 测试定义。

示例 5:按管道获取特定的 Application Insights Web 测试定义

$location01 = New-AzApplicationInsightsWebTestGeolocationObject -Location "emea-nl-ams-azr"
$location02 = New-AzApplicationInsightsWebTestGeolocationObject -Location "us-ca-sjc-azr"
New-AzApplicationInsightsWebTest -ResourceGroupName azpwsh-rg-test -Name standardwebtestpwsh03 -Location 'westus2' `
-Tag @{"hidden-link:/subscriptions/xxxxxxxxxx-xxxx-xxxxx-xxxxxxxxxxxx/resourceGroups/azpwsh-rg-test/providers/microsoft.insights/components/appinsightsportal01" = "Resource"} `
-RequestUrl "https://learn.microsoft.com/" -RequestHttpVerb "GET" `
-TestName 'standardwebtestpwsh03' `
-RuleSslCheck -RuleSslCertRemainingLifetimeCheck 7 -RuleExpectedHttpStatusCode 200 `
-Enabled -Frequency 300 -Timeout 120 -Kind "standard" -RetryEnabled -GeoLocation $location01, $location02 ` |Get-AzApplicationInsightsWebTest

Name                    Location WebTestKind ResourceGroupName  Enabled
----                    -------- ----------- -----------------  -------
standardwebtestpwsh03   westus2  standard    azpwsh-rg-test     True

此命令按管道获取特定的 Application Insights Web 测试定义。

参数

-AppInsightsName

Application Insights 组件资源的名称。

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-DefaultProfile

DefaultProfile 参数不起作用。 如果对其他订阅执行 cmdlet,请使用 SubscriptionId 参数。

Type:PSObject
Aliases:AzureRMContext, AzureCredential
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-InputObject

要构造的标识参数,请参阅 INPUTOBJECT 属性的 NOTES 部分并创建哈希表。

Type:IApplicationInsightsIdentity
Position:Named
Default value:None
Required:True
Accept pipeline input:True
Accept wildcard characters:False

-Name

Application Insights WebTest 资源的名称。

Type:String
Aliases:WebTestName
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-ResourceGroupName

资源组的名称。 此名称不区分大小写。

Type:String
Position:Named
Default value:None
Required:True
Accept pipeline input:False
Accept wildcard characters:False

-SubscriptionId

目标订阅的 ID。

Type:String[]
Position:Named
Default value:(Get-AzContext).Subscription.Id
Required:False
Accept pipeline input:False
Accept wildcard characters:False

输入

IApplicationInsightsIdentity

输出

IWebTest