Skip to content

Commit c980882

Browse files
authored
Add example for set-azwebapp to enable application insights (Azure#16608)
1 parent 7f81e9f commit c980882

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Websites/Websites/help/Set-AzWebApp.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,15 @@ $hashtable = @{myConnectionString = @{Type='MySql';Value='MySql Connection stri
7272
Set-AzWebApp -Name 'ContosoWebApp' -ResourceGroupName 'Default-Web-WestUS' -ConnectionString $hashtable
7373
```
7474

75+
### Example 5
76+
77+
Enable application insights for Web App
78+
```azurepowershell-interactive
79+
$key=(Get-AzApplicationInsights -ResourceId $ai).InstrumentationKey
80+
$setting=@{"ApplicationInsightsAgent_EXTENSION_VERSION"="~3"; "APPINSIGHTS_INSTRUMENTATIONKEY"=$key}
81+
Set-AzWebApp -AppSettings $setting -Name 'ContosoWebApp' -ResourceGroupName 'Default-Web-WestUS'
82+
```
83+
7584
## PARAMETERS
7685

7786
### -AlwaysOn

0 commit comments

Comments
 (0)