localdebug.private.ps1

# $VerbosePreference = "continue"

# Measure-Command { $rsg = New-AzState -Id /subscriptions/2f68ca09-59d9-4ab5-ad11-c54872bfa28d/resourceGroups/rg-testing-msx1 }

# # Measure-Command { $resources = (New-AzState)::FromIds($rsg.Children.Id, 20) }



# $VerbosePreference = "continue"
# $mg1 = New-AzState -Id /providers/Microsoft.Management/managementGroups/3fc1081d-6105-4e19-b60c-1ec1252cf560
# $mg1::DefaultThrottleLimit = 10
# $mg2 = $mg1::FromIds($mg1.Children.Id)
# $mg3 = $mg1::FromIds($mg2.Children.Id)
# $mg4 = $mg1::FromIds($mg3.Children.Id)
# $mg5 = $mg1::FromIds($mg4.Children.Id)
# $mg6 = $mg1::FromIds($mg5.Children.Id)



# # $mg1::GetAzConfig("/providers/Microsoft.Management/managementGroups/3fc1081d-6105-4e19-b60c-1ec1252cf560?expand=path&recurse=true") | ConvertTo-Json -Depth 10



# $VerbosePreference = "continue"
# $AzState = New-AzState
# Measure-Command {
# $AzState::FromScope("/providers/Microsoft.Management/managementGroups/platform/providers/Microsoft.Authorization/policyDefinitions")
# }
# $AzState::ClearCache()
# $AzState::ClearRestCache()
# Measure-Command {
# $AzState::FromScopeParallel("/providers/Microsoft.Management/managementGroups/platform/providers/Microsoft.Authorization/policyDefinitions", 200)
# }
# $AzState::ClearCache()
# $AzState::ClearRestCache()
# Measure-Command {
# $AzState::DirectFromScope("/providers/Microsoft.Management/managementGroups/platform/providers/Microsoft.Authorization/policyDefinitions")
# }
# $AzState::ClearCache()
# $AzState::ClearRestCache()




$VerbosePreference = "continue"
Measure-Command {
    $DiscoveryTest = New-AzStateDiscovery -RootId /providers/Microsoft.Management/managementGroups/3fc1081d-6105-4e19-b60c-1ec1252cf560 -IncludeManagementGroups -IncludeSubscriptions -IncludeResourceGroups -IncludeResources -ThrottleLimit 20 -Recurse
}


$VerbosePreference = "continue"
$AzState = New-AzState
$Test = $AzState::FromIds(@("/subscriptions/feab2d15-66b4-438b-accf-51f889b30ec3", "/subscriptions/feab2d15-66b4-438b-accf-51f889b30ec3/resourceGroups/nielsb"), 1, "SkipCache")