Skip to content

Commit

Permalink
Update New-AzApplicationInsightsWebTest.md (#26065)
Browse files Browse the repository at this point in the history
* Learn Editor: Update New-AzApplicationInsightsWebTest.md

* Learn Editor: Update New-AzApplicationInsightsWebTest.md
  • Loading branch information
CourtGoodson authored Sep 20, 2024
1 parent 1bcf13f commit ba0cb01
Showing 1 changed file with 21 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,25 @@ This command creates or updates a standard kind of the Application Insights web

The switch parameter "-Enabled" must be set explicitly to $false to disable the test.

### Example 3: Creates or updates a ping kind of the Application Insights web test
### Example 3: Creates a standard kind of the Application Insights web test with a custom header


```powershell
$headerField = New-AzApplicationInsightsWebTestHeaderFieldObject -Name "HeaderName1" -Value "HeaderValue1"
New-AzApplicationInsightsWebTest -ResourceGroupName exampleRG -Name expwshelltestheader2 -Location 'westus2' -Tag @{"hidden-link:<RESOURCE URL>" = "Resource"} -RequestUrl "https://www.bing.com" -RequestHttpVerb "GET" -TestName 'expwshelltestheader2' -RuleExpectedHttpStatusCode 200 -Frequency 300 -Enabled -Timeout 120 -Kind 'standard' -RetryEnabled -GeoLocation $geoLocation -RequestHeader $headerField
```


```output
Name Location WebTestKind ResourceGroupName Enabled
---- -------- ----------- ----------------- -------
expwshellheader2 westus2 standard exampleRG True
```

This command creates a standard kind of the Application Insights web test with a custom header

### Example 4: Creates or updates a ping kind of the Application Insights web test

```powershell
$geoLocation = @()
$geoLocation += New-AzApplicationInsightsWebTestGeolocationObject -Location "emea-nl-ams-azr"
Expand All @@ -102,7 +120,8 @@ pingwebtest-pwsh01 westus2 ping azpwsh-rg-test True

This command creates or updates an ping kind of the Application Insights web test.

### Example 4: Creates or updates a ping kind of the Application Insights web test with custom configuration
### Example 5: Creates or updates a ping kind of the Application Insights web test with custom configuration

```powershell
$geoLocation = @()
$geoLocation += New-AzApplicationInsightsWebTestGeolocationObject -Location "emea-nl-ams-azr"
Expand Down

0 comments on commit ba0cb01

Please sign in to comment.