Closed mikedhanson closed 1 month ago
I can reproduce this. This is happening in over HTTP but not in the integrated environment. We'll have a fix for this in 4.3.3.
Still seeing this issue on 4.3.3
I can't reproduce this.
PS C:\src\universal\src> (get-psujob -Id 5).Children | measure
Count : 4
Average :
Sum :
Maximum :
Minimum :
StandardDeviation :
Property :
PS C:\src\universal\src> Get-PSUInformation
Version BuildVersion
------- ------------
4.3.3 {"version":"2441366528"}
PS C:\src\universal\src> Get-Module Universal
ModuleType Version PreRelease Name ExportedCommands
---------- ------- ---------- ---- ----------------
Script 4.3.3 Universal {Clear-PSUCache, Connect-PSUEventHub, Connect-PSU…
Can you try to invoke the API directly?
Invoke-RestMethod 'http://localhost:5000/api/v1/job?trigger=true&child=true&take=100&parentId=15170' -UseDefaultCredentials
It should return a Page of jobs with a total property.
PS C:\src\universal\src> (Invoke-RestMethod 'http://localhost:5000/api/v1/job?trigger=true&child=true&take=100&parentId=5' -Headers @{ Authorization = "Bearer $AppToken" }).Total
4
What's interesting is that the cmdlet now limits it to 100 child jobs so it should never return more than 100.
@adamdriscoll - It was my issue. I never restarted my terminal and the universal module was still showing 4.3.2. After restarting the powershell process it seems to be working with 4.3.3 cmdlets
Job: 14743
![image](https://github.com/ironmansoftware/powershell-universal/assets/15201245/f9dbe523-f72d-4aa5-9619-0ef00490ea7d)
as you can see this job has 4 child jobs. None of these child jobs have children.
$Job = Get-psujob -id 14743 -UseDefaultCredentials -ComputerName http://localhost:5000
$Job.Children.id
Originally posted by @mikedhanson in https://github.com/ironmansoftware/powershell-universal/issues/3433#issuecomment-2214315346