diff --git a/Get-PC/Private/SCCMQueryBlock.ps1 b/Get-PC/Private/SCCMQueryBlock.ps1 index be3f1da..f176907 100644 --- a/Get-PC/Private/SCCMQueryBlock.ps1 +++ b/Get-PC/Private/SCCMQueryBlock.ps1 @@ -219,7 +219,7 @@ $Headers = @{ Write-Progress -Activity "Getting SCCM data for $comp" -Status 'Querying for CMDB data' -PercentComplete $progress -ParentID 0 -Id $PCID $timeout = if ($SparkQueryTimeoutSec) {$SparkQueryTimeoutSec} else {5} - $uri = "$Tenant/api/odata/businessobject/cis`?`$filter=Name eq '$comp'&`$top=1&`$skip=0" + $uri = "$Tenant/api/odata/businessobject/cis`?`$filter=AssetTag eq '$FindAssetTagSCCM'&`$top=1&`$skip=0" try { $Query = Invoke-RestMethod -Method GET -uri $uri -headers $Headers -TimeoutSec $timeout if ($Query) { diff --git a/Get-PC/patchnotes.txt b/Get-PC/patchnotes.txt index e3d3e6b..b83b402 100644 --- a/Get-PC/patchnotes.txt +++ b/Get-PC/patchnotes.txt @@ -1,3 +1,6 @@ +Patch +-Update SCCMQueryBlock uses asset tag to query Spark! + Patch 2025-5-6 -Update Custom SHSApps have more robust detection -Fix SCCM queries return mac address correctly