mirror of
https://github.com/MicrosoftDocs/windows-itpro-docs.git
synced 2025-06-08 10:37:22 +00:00
Merge pull request #10902 from MicrosoftDocs/danbrown-privacy-freshness
"Freshness" updates to "Diagnostic Data Viewer for PowerShell overview" article
This commit is contained in:
commit
1da224fac3
@ -1,13 +1,13 @@
|
||||
---
|
||||
description: Use this article to make informed decisions about how you can configure Windows diagnostic data in your organization.
|
||||
title: Configure Windows diagnostic data in your organization (Windows 10 and Windows 11)
|
||||
title: Configure Windows diagnostic data in your organization
|
||||
ms.service: windows-client
|
||||
ms.subservice: itpro-privacy
|
||||
ms.localizationpriority: high
|
||||
author: DHB-MSFT
|
||||
ms.author: danbrown
|
||||
manager: dansimp
|
||||
ms.date: 05/29/2025
|
||||
ms.date: 05/30/2025
|
||||
ms.topic: how-to
|
||||
hideEdit: true
|
||||
ms.collection:
|
||||
@ -246,7 +246,11 @@ Optional diagnostic data, previously labeled as **Full**, includes more detailed
|
||||
Use the steps in this section to configure the diagnostic data settings for Windows and Windows Server in your organization.
|
||||
|
||||
>[!IMPORTANT]
|
||||
>These diagnostic data settings only apply to components, features, and apps that are considered a part of the Windows operating system. Third-party apps and other Microsoft apps, such as Microsoft Office, that customers install may also collect and send diagnostic data using their own controls. You should work with your app vendors to understand their diagnostic data policy, and how you can opt in or opt out. For more information on how Microsoft Office uses diagnostic data, see [Overview of privacy controls for Microsoft 365 Apps for enterprise](/microsoft-365-apps/privacy/overview-privacy-controls). If you would like to control Windows data collection that isn't Windows diagnostic data, see [Manage connections from Windows operating system components to Microsoft services](manage-connections-from-windows-operating-system-components-to-microsoft-services.md).
|
||||
>- These diagnostic data settings only apply to components, features, and apps that are considered a part of the Windows operating system.
|
||||
>- Third-party apps and other Microsoft apps, such as Microsoft 365 Apps, that customers install may also collect and send diagnostic data using their own controls.
|
||||
>- You should work with your app vendors to understand their diagnostic data policy, and how you can opt in or opt out.
|
||||
>- For more information on how Microsoft 365 Apps uses diagnostic data, see [Overview of privacy controls for Microsoft 365 Apps for enterprise](/microsoft-365-apps/privacy/overview-privacy-controls).
|
||||
>- If you would like to control Windows data collection that isn't Windows diagnostic data, see [Manage connections from Windows operating system components to Microsoft services](manage-connections-from-windows-operating-system-components-to-microsoft-services.md).
|
||||
|
||||
You can configure your device's diagnostic data settings using the management tools you’re already using, such as Group Policy or MDM.
|
||||
|
||||
|
@ -1,5 +1,5 @@
|
||||
---
|
||||
title: Diagnostic Data Viewer for PowerShell Overview (Windows 10)
|
||||
title: Diagnostic Data Viewer for PowerShell overview
|
||||
description: Use this article to use the Diagnostic Data Viewer for PowerShell to review the diagnostic data sent to Microsoft by your device.
|
||||
ms.service: windows-client
|
||||
ms.subservice: itpro-privacy
|
||||
@ -7,34 +7,33 @@ ms.localizationpriority: high
|
||||
author: DHB-MSFT
|
||||
ms.author: danbrown
|
||||
manager: dansimp
|
||||
ms.date: 12/13/2018
|
||||
ms.date: 05/30/2025
|
||||
ms.topic: how-to
|
||||
hideEdit: true
|
||||
ms.collection:
|
||||
- privacy-windows
|
||||
- must-keep
|
||||
---
|
||||
|
||||
# Diagnostic Data Viewer for PowerShell Overview
|
||||
# Diagnostic Data Viewer for PowerShell overview
|
||||
|
||||
**Applies to**
|
||||
|
||||
- Windows 11, version 21H2 and later
|
||||
- Windows 10, version 1803 and later
|
||||
- Windows Server, version 1803
|
||||
- Windows Server 2019
|
||||
- Windows 11, version 21H2 and later
|
||||
- Windows 10, version 1803 and later
|
||||
- Windows Server, version 1803
|
||||
- Windows Server 2019
|
||||
|
||||
## Introduction
|
||||
The Diagnostic Data Viewer for PowerShell is a PowerShell module that lets you review the diagnostic data your device is sending to Microsoft, grouping the info into simple categories based on how it's used by Microsoft.
|
||||
|
||||
## Requirements
|
||||
> [!NOTE]
|
||||
> You must have administrative privilege on the device in order to use this PowerShell module.
|
||||
|
||||
You must have administrative privilege on the device in order to use this PowerShell module. This module requires OS version 1803 and higher.
|
||||
|
||||
## Install and Use the Diagnostic Data Viewer for PowerShell
|
||||
## Install the Diagnostic Data Viewer for PowerShell
|
||||
|
||||
You must install the module before you can use the Diagnostic Data Viewer for PowerShell.
|
||||
|
||||
### Opening an Elevated PowerShell session
|
||||
### Open an elevated PowerShell session
|
||||
|
||||
Using the Diagnostic Data Viewer for PowerShell requires administrative (elevated) privilege. There are two ways to open an elevated PowerShell prompt. You can use either method.
|
||||
- Go to **Start** > **Windows PowerShell** > **Run as administrator**
|
||||
@ -42,29 +41,34 @@ Using the Diagnostic Data Viewer for PowerShell requires administrative (elevate
|
||||
|
||||
### Install the Diagnostic Data Viewer for PowerShell
|
||||
|
||||
>[!IMPORTANT]
|
||||
>It is recommended to visit the documentation on [Getting Started](/powershell/gallery/getting-started) with PowerShell Gallery. This page provides more specific details on installing a PowerShell module.
|
||||
>[!TIP]
|
||||
>For more information on installing a PowerShell module, see [Getting Started with the PowerShell Galley](/powershell/gallery/getting-started).
|
||||
|
||||
To install the newest version of the Diagnostic Data Viewer PowerShell module, run the following command within an elevated PowerShell session:
|
||||
```powershell
|
||||
PS C:\> Install-Module -Name Microsoft.DiagnosticDataViewer
|
||||
```
|
||||
|
||||
To see more information about the module, visit [PowerShell Gallery](https://www.powershellgallery.com/packages/Microsoft.DiagnosticDataViewer).
|
||||
For more information about the module, go to the [Microsoft.DiagnosticDataViewer](https://www.powershellgallery.com/packages/Microsoft.DiagnosticDataViewer) page in the PowerShell Gallery.
|
||||
|
||||
### Turn on data viewing
|
||||
|
||||
Before you can use this tool, you must turn on data viewing. Turning on data viewing enables Windows to store a local history of your device's diagnostic data for you to view until you turn it off.
|
||||
|
||||
Note that this setting does not control whether your device sends diagnostic data. Instead, it controls whether your Windows device saves a local copy of the diagnostic data sent for your viewing.
|
||||
This setting doesn't control whether your device sends diagnostic data. Instead, it controls whether your Windows device saves a local copy of the diagnostic data sent for your viewing.
|
||||
|
||||
**To turn on data viewing through the Settings page**
|
||||
1. Go to **Start**, select **Settings** > **Privacy** > **Diagnostics & feedback**.
|
||||
Once data viewing is enabled, your device begins saving a history of diagnostic data that is sent to Microsoft from this point on.
|
||||
|
||||
2. Under **Diagnostic data**, turn on the **If data viewing is enabled, you can see your diagnostics data** option.
|
||||
>[!IMPORTANT]
|
||||
>Turning on data viewing can use up to 1 GB (default setting) of disk space on your system drive. We recommend that you turn off data viewing when you're done using the Diagnostic Data Viewer. For info about turning off data viewing, see the [Turn off data viewing](#turn-off-data-viewing) section in this article.
|
||||
|
||||

|
||||
#### To turn on data viewing through the Settings page
|
||||
|
||||
**To turn on data viewing through PowerShell**
|
||||
1. Go to **Start**, select **Settings** > **Privacy & security** > **Diagnostics & feedback**.
|
||||
|
||||
2. Under **View diagnostic data**, turn on the **Turn on the Diagnostic Data Viewer** option.
|
||||
|
||||
#### To turn on data viewing through PowerShell
|
||||
|
||||
Run the following command within an elevated PowerShell session:
|
||||
|
||||
@ -72,22 +76,15 @@ Run the following command within an elevated PowerShell session:
|
||||
PS C:\> Enable-DiagnosticDataViewing
|
||||
```
|
||||
|
||||
Once data viewing is enabled, your Windows machine will begin saving a history of diagnostic data that is sent to Microsoft from this point on.
|
||||
## Get started with using the Diagnostic Data Viewer for PowerShell
|
||||
|
||||
>[!IMPORTANT]
|
||||
>Turning on data viewing can use up to 1GB (default setting) of disk space on your system drive. We recommend that you turn off data viewing when you're done using the Diagnostic Data Viewer. For info about turning off data viewing, see the [Turn off data viewing](#turn-off-data-viewing) section in this article.
|
||||
|
||||
|
||||
### Getting Started with Diagnostic Data Viewer for PowerShell
|
||||
To see how to use the cmdlet, the parameters it accepts, and examples, run the following command from an elevated PowerShell session:
|
||||
|
||||
```powershell
|
||||
PS C:\> Get-Help Get-DiagnosticData
|
||||
```
|
||||
|
||||
**To Start Viewing Diagnostic Data**
|
||||
|
||||
From an elevated PowerShell session, run the following command:
|
||||
To start viewing Diagnostic Data, from an elevated PowerShell session, run the following command:
|
||||
|
||||
```powershell
|
||||
PS C:\> Get-DiagnosticData
|
||||
@ -95,46 +92,60 @@ PS C:\> Get-DiagnosticData
|
||||
|
||||
If the number of events is large, and you'd like to stop the command, enter `Ctrl+C`.
|
||||
|
||||
>[!IMPORTANT]
|
||||
>The above command may produce little to no results if you enabled data viewing recently. It can take several minutes before your Windows device can show diagnostic data it has sent. Use your device as you normally would in the mean time and try again.
|
||||
>[!NOTE]
|
||||
>The preceding command might produce little to no results if you enabled data viewing recently. It can take several minutes before your Windows device can show diagnostic data it sent.
|
||||
|
||||
## Working with the Diagnostic Data Viewer for PowerShell
|
||||
|
||||
### Doing more with the Diagnostic Data Viewer for PowerShell
|
||||
The Diagnostic Data Viewer for PowerShell provides you with the following features to view and filter your device's diagnostic data. You can also use the extensive suite of other PowerShell tools with this module.
|
||||
|
||||
- **View your diagnostic events.** Running `PS C:\> Get-DiagnosticData`, you can review your diagnostic events. These events reflect activities that occurred and were sent to Microsoft.
|
||||
> [!TIP]
|
||||
> For more information about the PowerShell commands available, see the [Microsoft.DiagnosticDataViewer module documentation](/powershell/module/microsoft.diagnosticdataviewer).
|
||||
|
||||
Each event is displayed as a PowerShell Object. By default each event shows the event name, the time when it was seen by your Windows device, whether the event is [Basic](./configure-windows-diagnostic-data-in-your-organization.md), its [diagnostic event category](#view-diagnostic-event-categories), and a detailed JSON view of the information it contains, which shows the event exactly as it was when sent to Microsoft. Microsoft uses this info to continually improve the Windows operating system.
|
||||
### View your diagnostic events
|
||||
|
||||
- <a id="view-diagnostic-event-categories" />**View diagnostic event categories.** Each event shows the diagnostic event categories that it belongs to. These categories define how events are used by Microsoft. The categories are shown as numeric identifiers. For more information about these categories, see [Windows Diagnostic Data](./windows-diagnostic-data.md).
|
||||
Running `PS C:\> Get-DiagnosticData`, you can review your diagnostic events. These events reflect activities that occurred and were sent to Microsoft.
|
||||
|
||||
To view the diagnostic category represented by each numeric identifier and what the category means, you can run the command:
|
||||
Each event is displayed as a PowerShell Object. By default each event shows the event name, the time when it was seen by your Windows device, whether the event is [Required](configure-windows-diagnostic-data-in-your-organization.md#required-diagnostic-data), its diagnostic event category, and a detailed JSON view of the information it contains, which shows the event exactly as it was when sent to Microsoft. Microsoft uses this info to continually improve the Windows operating system.
|
||||
|
||||
```powershell
|
||||
PS C:\> Get-DiagnosticDataTypes
|
||||
```
|
||||
### View diagnostic event categories
|
||||
|
||||
- **Filter events by when they were sent.** You can view events within specified time ranges by specifying a start time and end time of each command. For example, to see all diagnostic data sent between 12 and 6 hours ago, run the following command. Note that data is shown in order of oldest first.
|
||||
```powershell
|
||||
PS C:\> Get-DiagnosticData -StartTime (Get-Date).AddHours(-12) -EndTime (Get-Date).AddHours(-6)
|
||||
```
|
||||
Each event shows the diagnostic event categories that it belongs to. These categories define how events are used by Microsoft. The categories are shown as numeric identifiers.
|
||||
|
||||
- **Export the results of each command.** You can export the results of each command to a separate file such as a csv by using pipe `|`. For example,
|
||||
To view the diagnostic category represented by each numeric identifier and what the category means, you can run the following command:
|
||||
|
||||
```powershell
|
||||
PS C:\> Get-DiagnosticData | Export-Csv 'mydata.csv'
|
||||
```
|
||||
```powershell
|
||||
PS C:\> Get-DiagnosticDataTypes
|
||||
```
|
||||
|
||||
### Filter events by when they were sent
|
||||
|
||||
You can view events within specified time ranges by specifying a start time and end time of each command. For example, to see all diagnostic data sent between 12 and 6 hours ago, run the following command. Data is shown in order of oldest first.
|
||||
|
||||
```powershell
|
||||
PS C:\> Get-DiagnosticData -StartTime (Get-Date).AddHours(-12) -EndTime (Get-Date).AddHours(-6)
|
||||
```
|
||||
|
||||
### Export the results of each command
|
||||
|
||||
You can export the results of each command to a separate file such as a csv by using pipe `|`. For example:
|
||||
|
||||
```powershell
|
||||
PS C:\> Get-DiagnosticData | Export-Csv 'mydata.csv'
|
||||
```
|
||||
|
||||
## Turn off data viewing
|
||||
|
||||
When you're done reviewing your diagnostic data, we recommend turning off data viewing to prevent using up more memory. Turning off data viewing stops Windows from saving a history of your diagnostic data and clears the existing history of diagnostic data from your device.
|
||||
|
||||
**To turn off data viewing through the Settings page**
|
||||
1. Go to **Start**, select **Settings** > **Privacy** > **Diagnostics & feedback**.
|
||||
### To turn off data viewing through the Settings page
|
||||
|
||||
2. Under **Diagnostic data**, turn off the **If data viewing is enabled, you can see your diagnostics data** option.
|
||||
1. Go to **Start**, select **Settings** > **Privacy & security** > **Diagnostics & feedback**.
|
||||
|
||||

|
||||
2. Under **View diagnostic data**, turn off the **If data viewing is enabled, you can see your diagnostics data** option.
|
||||
|
||||
**To turn off data viewing through PowerShell**
|
||||
|
||||
### To turn off data viewing through PowerShell
|
||||
|
||||
Within an elevated PowerShell session, run the following command:
|
||||
|
||||
@ -143,17 +154,16 @@ PS C:\> Disable-DiagnosticDataViewing
|
||||
```
|
||||
|
||||
## Modifying the size of your data history
|
||||
By default, the tool will show you up to 1GB or 30 days of data (whichever comes first). Once either the time or space limit is reached, the data is incrementally dropped with the oldest data points dropped first.
|
||||
|
||||
**Modify the size of your data history**
|
||||
By default, the tool shows you up to 1 GB or 30 days of data (whichever comes first). Once either the time or space limit is reached, the data is incrementally dropped with the oldest data points dropped first.
|
||||
|
||||
>[!IMPORTANT]
|
||||
>Modifying the maximum amount of diagnostic data viewable by the tool may come with performance impacts to your machine.
|
||||
### Modify the size of your data history
|
||||
|
||||
>[!IMPORTANT]
|
||||
>If you modify the maximum data history size from a larger value to a lower value, you must turn off data viewing and turn it back on in order to reclaim disk space.
|
||||
>[!IMPORTANT]
|
||||
>- Modifying the maximum amount of diagnostic data viewable by the tool might come with performance impacts to your machine.
|
||||
>- If you modify the maximum data history size from a larger value to a lower value, you must turn off data viewing and turn it back on in order to reclaim disk space.
|
||||
|
||||
You can change the maximum data history size (in megabytes) that you can view. For example, to set the maximum data history size to 2048MB (2GB), you can run the following command.
|
||||
You can change the maximum data history size (in megabytes) that you can view. For example, to set the maximum data history size to 2,048 MB (2 GB), you can run the following command.
|
||||
|
||||
```powershell
|
||||
PS C:\> Set-DiagnosticStoreCapacity -Size 2048
|
||||
@ -165,22 +175,16 @@ You can change the maximum data history time (in hours) that you can view. For e
|
||||
PS C:\> Set-DiagnosticStoreCapacity -Time 24
|
||||
```
|
||||
|
||||
>[!IMPORTANT]
|
||||
>You may need to restart your machine for the new settings to take effect.
|
||||
>[!NOTE]
|
||||
>- You might need to restart your machine for the new settings to take effect.
|
||||
>- If you have the [Diagnostic Data Viewer](diagnostic-data-viewer-overview.md) store app installed on the same device, modifications to the size of your data history through the PowerShell module will also be reflected in the app.
|
||||
|
||||
>[!IMPORTANT]
|
||||
>If you have the [Diagnostic Data Viewer](diagnostic-data-viewer-overview.md) store app installed on the same device, modifications to the size of your data history through the PowerShell module will also be reflected in the app.
|
||||
### Reset the size of your data history
|
||||
|
||||
**Reset the size of your data history**
|
||||
|
||||
To reset the maximum data history size back to its original 1GB default value, run the following command in an elevated PowerShell session:
|
||||
To reset the maximum data history size back to its original 1 GB default value, run the following command in an elevated PowerShell session:
|
||||
|
||||
```powershell
|
||||
PS C:\> Set-DiagnosticStoreCapacity -Size 1024 -Time 720
|
||||
```
|
||||
|
||||
When resetting the size of your data history to a lower value, be sure to turn off data viewing and turn it back on in order to reclaim disk space.
|
||||
|
||||
## Related Links
|
||||
- [Module in PowerShell Gallery](https://www.powershellgallery.com/packages/Microsoft.DiagnosticDataViewer)
|
||||
- [Documentation for Diagnostic Data Viewer for PowerShell](/powershell/module/microsoft.diagnosticdataviewer)
|
||||
|
@ -7,9 +7,9 @@
|
||||
href: configure-windows-diagnostic-data-in-your-organization.md
|
||||
- name: Diagnostic Data Viewer
|
||||
items:
|
||||
- name: Diagnostic Data Viewer Overview
|
||||
- name: Diagnostic Data Viewer overview
|
||||
href: diagnostic-data-viewer-overview.md
|
||||
- name: Diagnostic Data Viewer for PowerShell Overview
|
||||
- name: Diagnostic Data Viewer for PowerShell overview
|
||||
href: diagnostic-data-viewer-powershell.md
|
||||
- name: Required Windows diagnostic data events and fields
|
||||
items:
|
||||
|
@ -7,7 +7,7 @@ ms.localizationpriority: high
|
||||
author: DHB-MSFT
|
||||
ms.author: danbrown
|
||||
manager: dansimp
|
||||
ms.date: 05/29/2025
|
||||
ms.date: 05/30/2025
|
||||
ms.topic: concept-article
|
||||
hideEdit: true
|
||||
ms.collection:
|
||||
@ -60,7 +60,7 @@ The following table provides an overview of the Windows 10 and Windows 11 privac
|
||||
|
||||
[Diagnostic Data Viewer (DDV)](diagnostic-data-viewer-overview.md) is a Microsoft Store app (available in Windows 10, version 1803 and later and Windows 11) that lets a user review the Windows diagnostic data that is being collected on their Windows device and sent to Microsoft in real-time. DDV groups the information into simple categories that describe the data that’s being collected.
|
||||
|
||||
An administrator can also use the Diagnostic Data Viewer for PowerShell module to view the diagnostic data collected from the device instead of using the Diagnostic Data Viewer UI. The [Diagnostic Data Viewer for PowerShell Overview](diagnostic-data-viewer-powershell.md) provides further information.
|
||||
An administrator can also use the Diagnostic Data Viewer for PowerShell module to view the diagnostic data collected from the device instead of using the Diagnostic Data Viewer UI. The [Diagnostic Data Viewer for PowerShell overview](diagnostic-data-viewer-powershell.md) provides further information.
|
||||
|
||||
> [!Note]
|
||||
> If the Windows diagnostic data processor configuration is enabled, IT administrators should use the admin portal to fulfill data subject requests to access or export Windows diagnostic data associated with a particular user’s device usage. For more information, see [The process for exercising data subject rights](#3-the-process-for-exercising-data-subject-rights).
|
||||
@ -146,7 +146,7 @@ Windows 10, version 1809 and later and Windows 11 allow a user to delete diagnos
|
||||
An administrator can disable a user’s ability to delete their device’s diagnostic data by setting the Group Policy: **Computer Configuration** > **Administrative Templates** > **Windows Components** > **Data Collection and Preview Builds** > **Disable deleting diagnostic data** or the MDM policy `DisableDeviceDelete`.
|
||||
|
||||
>[!Note]
|
||||
>If the Windows diagnostic data processor configuration is enabled, the Delete diagnostic data button will be disabled and the powershell cmdlet will not delete data collected under this configuration. IT administrators can instead delete diagnostic data collected by invoking a delete request from the admin portal.
|
||||
>If the Windows diagnostic data processor configuration is enabled, the Delete diagnostic data button will be disabled and the PowerShell cmdlet will not delete data collected under this configuration. IT administrators can instead delete diagnostic data collected by invoking a delete request from the admin portal.
|
||||
|
||||
#### _2.3.7 Diagnostic data: Enabling the Windows diagnostic data processor configuration_
|
||||
|
||||
@ -184,14 +184,14 @@ Users can delete their device-based data by opening the Windows settings app and
|
||||
|
||||
### 3.2 View
|
||||
|
||||
The [Diagnostic Data Viewer (DDV)](diagnostic-data-viewer-overview.md) provides a view into the diagnostic data being collected from a Windows device. Administrators can also use the [Get-DiagnosticData](diagnostic-data-viewer-powershell.md#install-and-use-the-diagnostic-data-viewer-for-powershell) PowerShell cmdlet.
|
||||
The [Diagnostic Data Viewer (DDV)](diagnostic-data-viewer-overview.md) provides a view into the diagnostic data being collected from a Windows device. Administrators can also use the [Get-DiagnosticData](/powershell/module/microsoft.diagnosticdataviewer/get-diagnosticdata) PowerShell cmdlet.
|
||||
|
||||
>[!Note]
|
||||
>If the Windows diagnostic data processor configuration is enabled, IT administrators can view the diagnostic data that is associated with a user from the admin portal.
|
||||
|
||||
### 3.3 Export
|
||||
|
||||
The [Diagnostic Data Viewer (DDV)](diagnostic-data-viewer-overview.md) provides the ability to export the diagnostic data captured while the app is running, by clicking the **Export** data button in the top menu. Administrators can also use the [Get-DiagnosticData](diagnostic-data-viewer-powershell.md#install-and-use-the-diagnostic-data-viewer-for-powershell) PowerShell cmdlet script.
|
||||
The [Diagnostic Data Viewer (DDV)](diagnostic-data-viewer-overview.md) provides the ability to export the diagnostic data captured while the app is running, by clicking the **Export** data button in the top menu. Administrators can also use the [Get-DiagnosticData](/powershell/module/microsoft.diagnosticdataviewer/get-diagnosticdata) PowerShell cmdlet.
|
||||
|
||||
>[!Note]
|
||||
>If the Windows diagnostic data processor configuration is enabled, IT administrators can also export the diagnostic data that is associated with a user from the admin portal.
|
||||
|
Loading…
x
Reference in New Issue
Block a user