From a16bdb6b40b0f8017ba45dec039dece3951b6d7c Mon Sep 17 00:00:00 2001 From: Zachary Gorman Date: Mon, 5 May 2025 11:29:01 -0700 Subject: [PATCH] SCCM Query block didn't report mac address if there was only one. Fixed. --- Get-PC/Private/SCCMQueryBlock.ps1 | 2 +- Get-PC/patchnotes.txt | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Get-PC/Private/SCCMQueryBlock.ps1 b/Get-PC/Private/SCCMQueryBlock.ps1 index 7fe7fbb..be3f1da 100644 --- a/Get-PC/Private/SCCMQueryBlock.ps1 +++ b/Get-PC/Private/SCCMQueryBlock.ps1 @@ -72,7 +72,7 @@ $Headers = @{ $FindMacAddressSCCM = $SCCMResults | Select-Object -ExpandProperty MACAddresses $FindMacAddressSCCM = if($FindMacAddressSCCM.Count -gt 1){ $FindMacAddressSCCM[0] - } + } else { $FindMacAddressSCCM } $progress += 10 Write-Progress -Activity "Getting SCCM data for $comp" -Status 'Querying for Model' -PercentComplete $progress -ParentID 0 -Id $PCID diff --git a/Get-PC/patchnotes.txt b/Get-PC/patchnotes.txt index 1fa1316..21a0217 100644 --- a/Get-PC/patchnotes.txt +++ b/Get-PC/patchnotes.txt @@ -1,5 +1,6 @@ Patch -Update Custom SHSApps have more robust detection +-Fix SCCM queries return mac address correctly Patch 2025-4-29 -Fix DEL messages from SCCM queries now use the correct hostname