You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Rewrite of the Tests processing logic, to enable parallel processing of tests.
By default, Up to 5 tests will now be processed at a time, there is a parameter & configuration setting to change that.
Added a new command for better Tests diagnostics:
Get-ZtTestStatistics
$s=Get-ZtTestStatistics$s[0].Messages
Timestamp FunctionName Line Level TargetObject Message
--------- ------------ ---- ----- ------------ -------
2025-10-16 16:02:31 Invoke-ZtTest 54 Verbose Processing test '21810'
2025-10-16 16:02:31 Test-Assessment-21810 21 VeryVerbose 🟦 Start
2025-10-16 16:02:46 Add-ZtTestResultDetail 192 Verbose Adding test result detail for Resource-specific consent is restricted
2025-10-16 16:02:46 Add-ZtTestResultDetail 193 Debug Result: …
2025-10-16 16:02:46 Invoke-ZtTest 86 Verbose Processing test '21810' - Concluded
$s|Where-Object Success -ne$true
TestID Start Duration Success Error
------ ----- -------- ------- -----
21822 2025-10-16 16:02:40 00:00:02.1888895 False Cannot bind argument to parameter 'InputObject' because it is null.
24568 2025-10-16 16:02:54 00:00:00.1956550 False Cannot bind argument to parameter 'Policies' because it is null.
21862 2025-10-16 16:02:45 00:00:00.0535597 False Response status code does not indicate success: Forbidden (Forbidden).
Other tweaks
Upd: Invoke-ZtGraphRequestCache - added throttling for Intune requests to 1000/20s
Fix: Invoke-ZtAssessment - Removed Progressbar when deleting old report data. No longer hangs around until INvoke-ZtAssessment completes.
Fix: Invoke-ZtAssessment - Database disconnects properly, without calling -Debug.
This is starting to look good Friedrich. Thanks a lot.
A few things: The Azure issue didn't exist with the single thread.
Some Intune APIs /tests are heavily throttled (see below). I think for those it will be good to flag them to only execute sequently instead of being run parallely. Maybe we use some metadata on the test that says not to run them in parallel (or some other idea).
Also the other area that does take a lot of time is the data export method Export-TenantData specifically Applications, Service Principals (which can have a million plus objects in large tenants). I think running parallel there will help reduce the overall time by a lot.
Heya Merill,
I've added throttling for the Intune endpoints (and added a simple way in variables.ps1 to add more throttling for specific endpoints, if it becomes necessary), This throttling applies across all runspaces and should avoid multiple Intune tests interfering with each other.
Though it may reduce some parallelism performance in those cases, it is the architecturally most simple solution while also avoiding to make Test writing any more complex.
I am unfortunately unable to reproduce the first error (Get-AzContext).
Can you show what Az.Accounts versions you have installed?
Get-Module Az.Accounts -ListAvailable
re: Export performance
That was one of the main items I worked on this week and hope to have an update for you today.
Parallelized, but also improved SPN sub-properties processing (A prime case for batching). Some of the headaches from that just made my mind escape into "doing that other thing first".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Rewrite of the Tests processing logic, to enable parallel processing of tests.
By default, Up to 5 tests will now be processed at a time, there is a parameter & configuration setting to change that.
Added a new command for better Tests diagnostics:
INvoke-ZtAssessmentcompletes.-Debug.