Skip to content

Commit

Permalink
Merge pull request microsoft#4550 from Borgquite/faster-computerinfo
Browse files Browse the repository at this point in the history
Update Get-ComputerInfo call to Get-CimInstance to improve telemetry performance
  • Loading branch information
ykuijs authored Apr 12, 2024
2 parents 1b4c625 + f673988 commit 1e50365
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@
* DEPENDENCIES
* Updated Microsoft.Graph dependencies to version 2.17.0.
* Updated MicrosoftTeams to version 6.1.0.
* MISC
* Telemetry
* Get operating system using faster method to speed up telemetry calls.

# 1.24.403.1

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -205,7 +205,7 @@ function Add-M365DSCTelemetryEvent
{
if ($null -eq $Global:M365DSCOSInfo)
{
$Global:M365DSCOSInfo = (Get-ComputerInfo -Property OSName -ErrorAction SilentlyContinue).OSName
$Global:M365DSCOSInfo = (Get-CimInstance -ClassName Win32_OperatingSystem -Property Caption -ErrorAction SilentlyContinue).Caption
}
$Data.Add('M365DSCOSVersion', $Global:M365DSCOSInfo)
}
Expand Down

0 comments on commit 1e50365

Please sign in to comment.