Skip to content

Commit

Permalink
Merge pull request #4772 from NikCharlebois/Export-Telemetry
Browse files Browse the repository at this point in the history
Export telemetry
  • Loading branch information
NikCharlebois committed Jun 19, 2024
2 parents fc45d11 + efcf3fe commit 087fffc
Show file tree
Hide file tree
Showing 318 changed files with 1,630 additions and 12 deletions.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,9 @@

* SCDLPComplianceRule
* Fix #4259 and #3845
* MISC
* Improved telemetry around Export sizes.

# 1.24.612.1

* IntuneAppConfigurationDevicePolicy
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -489,6 +489,11 @@ function Export-TargetResource
}
foreach ($config in $getValue)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$displayedKey = $config.Id
if (-not [String]::IsNullOrEmpty($config.displayName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1068,6 +1068,11 @@ function Export-TargetResource
}
foreach ($config in $Script:exportedInstances)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$displayedKey = $config.Id
if (-not [String]::IsNullOrEmpty($config.displayName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -911,6 +911,11 @@ function Export-TargetResource
[array] $Script:exportedInstances = Get-MgApplication -Filter $Filter -All -ErrorAction Stop
foreach ($AADApp in $Script:exportedInstances)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

Write-Host " |---[$i/$($Script:exportedInstances.Count)] $($AADApp.DisplayName)" -NoNewline
$Params = @{
ApplicationId = $ApplicationId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,11 @@ function Export-TargetResource
}
foreach ($config in $getValue)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$displayedKey = $config.Id

Write-Host " |---[$i/$($getValue.Count)] $displayedKey" -NoNewline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -365,6 +365,11 @@ function Export-TargetResource
}
foreach ($config in $getValue)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$displayedKey = $config.Id + " - " + $config.DisplayName

Write-Host " |---[$i/$($getValue.Count)] $displayedKey" -NoNewline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -332,6 +332,11 @@ function Export-TargetResource
$dscContent = ''
try
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$Params = @{
IsSingleInstance = 'Yes'
Credential = $Credential
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -583,6 +583,11 @@ function Export-TargetResource
}
foreach ($config in $getValue)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$displayedKey = $config.Id
if (-not [String]::IsNullOrEmpty($config.displayName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -785,6 +785,11 @@ function Export-TargetResource
}
foreach ($config in $getValue)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$displayedKey = $config.Id
if (-not [String]::IsNullOrEmpty($config.displayName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -523,6 +523,11 @@ function Export-TargetResource
}
foreach ($config in $getValue)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$displayedKey = $config.Id

Write-Host " |---[$i/$($getValue.Count)] $displayedKey" -NoNewline
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -551,6 +551,11 @@ function Export-TargetResource
}
foreach ($config in $getValue)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$displayedKey = $config.Id
Write-Host " |---[$i/$($getValue.Count)] $displayedKey" -NoNewline
$params = @{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,11 @@ function Export-TargetResource
}
foreach ($config in $getValue)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$displayedKey = $config.Id
Write-Host " |---[$i/$($getValue.Count)] $displayedKey" -NoNewline
$params = @{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -499,6 +499,11 @@ function Export-TargetResource
}
foreach ($config in $getValue)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$displayedKey = $config.Id
Write-Host " |---[$i/$($getValue.Count)] $displayedKey" -NoNewline
$params = @{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -568,6 +568,11 @@ function Export-TargetResource
}
foreach ($config in $getValue)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$displayedKey = $config.Id
if (-not [String]::IsNullOrEmpty($config.displayName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,11 @@ function Export-TargetResource
}
foreach ($config in $getValue)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$displayedKey = $config.Id
Write-Host " |---[$i/$($getValue.Count)] $displayedKey" -NoNewline
$params = @{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -575,6 +575,11 @@ function Export-TargetResource
}
foreach ($config in $getValue)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$displayedKey = $config.Id
Write-Host " |---[$i/$($getValue.Count)] $displayedKey" -NoNewline
$params = @{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,11 @@ function Export-TargetResource
}
foreach ($config in $getValue)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$displayedKey = $config.Id
if (-not [String]::IsNullOrEmpty($config.displayName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -570,7 +570,10 @@ function Export-TargetResource

try
{
$dscContent = ''
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$params = @{
IsSingleInstance = 'Yes'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2051,6 +2051,11 @@ function Export-TargetResource
Write-Host "`r`n" -NoNewline
foreach ($Policy in $Policies)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

Write-Host " |---[$i/$($Policies.Count)] $($Policy.DisplayName)" -NoNewline
$Params = @{
DisplayName = $Policy.DisplayName
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,11 @@ function Export-TargetResource

try
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$dscContent = ''
$params = @{
IsSingleInstance = 'Yes'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,11 @@ function Export-TargetResource

try
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$dscContent = ''
$Params = @{
IsSingleInstance = 'Yes'
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -485,6 +485,11 @@ function Export-TargetResource
Write-Host "`r`n" -NoNewline
foreach ($entry in $getValue)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

Write-Host " |---[$i/$($getValue.Count)] $($entry.TenantId)" -NoNewline
$Params = @{
PartnerTenantId = $entry.TenantId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -934,6 +934,11 @@ function Export-TargetResource
}
foreach ($config in $getValue)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$displayedKey = $config.id
if (-not [String]::IsNullOrEmpty($config.displayName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -925,6 +925,11 @@ function Export-TargetResource
}
foreach ($config in $getValue)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$displayedKey = $config.id
if (-not [String]::IsNullOrEmpty($config.displayName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -465,6 +465,11 @@ function Export-TargetResource

foreach ($catalogId in $getValue)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$config = Get-MgBetaEntitlementManagementAccessPackageCatalog -AccessPackageCatalogId $catalogId
$displayedKey = $config.id
if (-not [String]::IsNullOrEmpty($config.displayName))
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -730,6 +730,11 @@ function Export-TargetResource

foreach ($resource in $resources)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

Write-Host " |---[$j/$($resources.Count)] $($resource.DisplayName)" -NoNewline

$params = @{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -781,6 +781,11 @@ function Export-TargetResource
}
foreach ($config in $getValue)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$displayedKey = $config.id
if (-not [String]::IsNullOrEmpty($config.displayName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -449,6 +449,11 @@ function Export-TargetResource
}
foreach ($config in $getValue)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$displayedKey = $config.id
if (-not [String]::IsNullOrEmpty($config.displayName))
{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -322,6 +322,11 @@ function Export-TargetResource

try
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$params = @{
IsSingleInstance = 'Yes'
AllowExternalIdentitiesToLeave = $true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1153,6 +1153,11 @@ function Export-TargetResource
Write-Host "`r`n" -NoNewline
foreach ($group in $Script:exportedGroups)
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

Write-Host " |---[$i/$($Script:exportedGroups.Count)] $($group.DisplayName)" -NoNewline
$Params = @{
ApplicationSecret = $ApplicationSecret
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -407,6 +407,11 @@ function Export-TargetResource
$principal = '' # Principal represents the "NetBios" name of the tenant (e.g. the M365DSC part of M365DSC.onmicrosoft.com)
try
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

if ($ConnectionMode -eq 'ServicePrincipalWithThumbprint')
{
$organization = Get-M365DSCTenantDomain -ApplicationId $ApplicationId `
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -363,6 +363,11 @@ function Export-TargetResource

try
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$dscContent = ''
$Params = @{
ApplicationId = $ApplicationId
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -514,6 +514,11 @@ function Export-TargetResource

try
{
if ($null -ne $Global:M365DSCExportResourceInstancesCount)
{
$Global:M365DSCExportResourceInstancesCount++
}

$Params = @{
ApplicationId = $ApplicationId
TenantId = $TenantId
Expand Down
Loading

0 comments on commit 087fffc

Please sign in to comment.