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>]
Description
取得特定的 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 元件資源的名稱。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-DefaultProfile
DefaultProfile 參數無法運作。 如果針對不同的訂用帳戶執行 Cmdlet,請使用 SubscriptionId 參數。
類型: | PSObject |
別名: | AzureRMContext, AzureCredential |
Position: | Named |
預設值: | None |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |
-InputObject
Identity Parameter To construct, see NOTES section for INPUTOBJECT properties and create a hash table.
類型: | IApplicationInsightsIdentity |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | True |
接受萬用字元: | False |
-Name
Application Insights WebTest 資源的名稱。
類型: | String |
別名: | WebTestName |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-ResourceGroupName
資源群組的名稱。 名稱不區分大小寫。
類型: | String |
Position: | Named |
預設值: | None |
必要: | True |
接受管線輸入: | False |
接受萬用字元: | False |
-SubscriptionId
目標訂用帳戶的標識碼。
類型: | String[] |
Position: | Named |
預設值: | (Get-AzContext).Subscription.Id |
必要: | False |
接受管線輸入: | False |
接受萬用字元: | False |