Skip to content

Commit bd47ac5

Browse files
committed
Add powershell example of disabling ip masking
1 parent 201799e commit bd47ac5

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

articles/azure-monitor/app/ip-collection.md

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
title: Application Insights IP address collection | Microsoft Docs
33
description: Understand how Application Insights handles IP addresses and geolocation.
44
ms.topic: conceptual
5-
ms.date: 11/15/2022
5+
ms.date: 04/06/2023
66
ms.custom: devx-track-js
77
ms.reviewer: saars
88
---
@@ -126,6 +126,16 @@ Content-Length: 54
126126
}
127127
```
128128
129+
### Powershell
130+
131+
The Powershell 'Update-AzApplicationInsights' cmdlet can disable IP masking with the `DisableIPMasking` parameter.
132+
133+
```powershell
134+
Update-AzApplicationInsights -Name "aiName" -ResourceGroupName "rgName" -DisableIPMasking $false
135+
```
136+
137+
For more information on the 'Update-AzApplicationInsights' cmdlet, see [Update-AzApplicationInsights](https://learn.microsoft.com/powershell/module/az.applicationinsights/update-azapplicationinsights)
138+
129139
## Telemetry initializer
130140

131141
If you need a more flexible alternative than `DisableIpMasking`, you can use a [telemetry initializer](./api-filtering-sampling.md#addmodify-properties-itelemetryinitializer) to copy all or part of the IP address to a custom field. The code for this class is the same across .NET versions.

0 commit comments

Comments
 (0)