Preventing Spark! from hanging our prescious Get-PC
This commit is contained in:
parent
57384fff05
commit
f950cd11a7
|
|
@ -12,7 +12,7 @@
|
|||
RootModule = 'Get-PC.psm1'
|
||||
|
||||
# Version number of this module.
|
||||
ModuleVersion = '0.4.5'
|
||||
ModuleVersion = '0.4.6'
|
||||
|
||||
# Supported PSEditions
|
||||
# CompatiblePSEditions = @()
|
||||
|
|
|
|||
|
|
@ -302,9 +302,10 @@ function Get-PCBatchInvoke {
|
|||
Default {$chassisType = "Unknown Model/Chassis"}
|
||||
}
|
||||
|
||||
Write-Progress -Activity "Retrieving data from online computers" -Status "$Env:COMPUTERNAME | Querying Spark!... Timeout 100s" -PercentComplete 90
|
||||
$uri = "${using:Tenant}/api/odata/businessobject/cis`?`$filter=Name eq '$ENV:COMPUTERNAME'&`$top=1&`$skip=0"
|
||||
try {
|
||||
$Query = Invoke-RestMethod -Method GET -uri $uri -headers ${using:Headers}
|
||||
$Query = Invoke-RestMethod -Method GET -uri $uri -headers ${using:Headers} -TimeoutSec 100
|
||||
} catch {
|
||||
Write-Host $_.Exception.Message
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,3 +1,6 @@
|
|||
Patch: 2024-09-05
|
||||
-Fix Spark! hangs sometimes, added timeout in BatchInvokes
|
||||
|
||||
Patch: 2024-09-04
|
||||
-Add Logging for GetPCWrapped
|
||||
-Fix Ambiguous CMDB results now report error message
|
||||
|
|
|
|||
Loading…
Reference in a new issue