|
| 1 | +--- |
| 2 | +Module Name: PnP.PowerShell |
| 3 | +schema: 2.0.0 |
| 4 | +applicable: SharePoint Online |
| 5 | +online version: https://pnp.github.io/powershell/cmdlets/Get-PnPEnterpriseAppInsightsReport.html |
| 6 | +external help file: PnP.PowerShell.dll-Help.xml |
| 7 | +title: Get-PnPEnterpriseAppInsightsReport |
| 8 | +--- |
| 9 | + |
| 10 | +# Get-PnPEnterpriseAppInsightsReport |
| 11 | + |
| 12 | +## SYNOPSIS |
| 13 | + |
| 14 | +**Required Permissions** |
| 15 | + |
| 16 | + * Microsoft SharePoint API: Sites.ReadWrite.All |
| 17 | + |
| 18 | +Checks for the status of the generation of the App Insights reports and allows downloading them when they're done. |
| 19 | + |
| 20 | +## SYNTAX |
| 21 | + |
| 22 | +### Details on all available reports |
| 23 | + |
| 24 | +```powershell |
| 25 | +Get-PnPEnterpriseAppInsightsReport |
| 26 | +``` |
| 27 | + |
| 28 | +### Details on a specific report |
| 29 | + |
| 30 | +```powershell |
| 31 | +Get-PnPEnterpriseAppInsightsReport -ReportId <string> |
| 32 | +``` |
| 33 | + |
| 34 | +### Download a report |
| 35 | + |
| 36 | +```powershell |
| 37 | +Get-PnPEnterpriseAppInsightsReport -ReportId <string> -Action Download |
| 38 | +``` |
| 39 | + |
| 40 | +## DESCRIPTION |
| 41 | + |
| 42 | +This cmdlet allows checking for the status of generated App Insights reports. Only one report can exist for every supported timespan `day, 7 days, 14 days, or 28 days. New requests for reports can be initiated using [Start-PnPEnterpriseAppInsightsReport](Get-PnPEnterpriseAppInsightsReport.md) and will overwrite any existing reports thay may exist. |
| 43 | + |
| 44 | +This cmdlet also allows for downloading of the report data when the report is ready. |
| 45 | + |
| 46 | +## EXAMPLES |
| 47 | + |
| 48 | +### EXAMPLE 1 |
| 49 | +```powershell |
| 50 | +Get-PnPEnterpriseAppInsightsReport |
| 51 | +``` |
| 52 | + |
| 53 | +Will return all reports that have been generated or are still being generated. |
| 54 | + |
| 55 | +### EXAMPLE 2 |
| 56 | +```powershell |
| 57 | +Get-PnPEnterpriseAppInsightsReport -ReportId bed8845f-72ba-43ec-b1f3-844ff6a64f28 |
| 58 | +``` |
| 59 | + |
| 60 | +Will return details on the report with the specified ID. |
| 61 | + |
| 62 | +### EXAMPLE 3 |
| 63 | +```powershell |
| 64 | +Get-PnPEnterpriseAppInsightsReport -ReportId bed8845f-72ba-43ec-b1f3-844ff6a64f28 -Action Download |
| 65 | +``` |
| 66 | + |
| 67 | +Will return the contents of the report with the specified ID as text. |
| 68 | + |
| 69 | +## PARAMETERS |
| 70 | + |
| 71 | +### -ReportId |
| 72 | +The amount of days to cover in the report. Valid values are 1, 7, 14, and 28. Default is 1. |
| 73 | + |
| 74 | +```yaml |
| 75 | +Type: string |
| 76 | +Parameter Sets: Details on a specific report, Download a report |
| 77 | + |
| 78 | +Required: True |
| 79 | +Position: Named |
| 80 | +Default value: 1 |
| 81 | +Accept pipeline input: True (ByValue) |
| 82 | +Accept wildcard characters: False |
| 83 | +``` |
| 84 | +
|
| 85 | +### -Action |
| 86 | +When provided with the value `Download`, the cmdlet will return the contents of the report as text. |
| 87 | + |
| 88 | +```yaml |
| 89 | +Type: short |
| 90 | +Parameter Sets: Download a report |
| 91 | +
|
| 92 | +Required: True |
| 93 | +Position: Named |
| 94 | +Default value: None |
| 95 | +Accept pipeline input: False |
| 96 | +Accept wildcard characters: False |
| 97 | +``` |
| 98 | + |
| 99 | +## RELATED LINKS |
| 100 | + |
| 101 | +[Microsoft 365 Patterns and Practices](https://aka.ms/m365pnp) |
| 102 | +[Generate App Insights Reports](https://learn.microsoft.com/sharepoint/app-insights) |
0 commit comments