IntuneManagement
IntuneManagement copied to clipboard
add "Load option" to the main settings into "MS Graph General" section
Please add "Load option" with values:
- 20 (default)
- 100 (max)
- All (to load All)
It looks like it should be located in "MS Graph General" section
without "Load All" now I have an issue https://github.com/Micke-K/IntuneManagement/issues/299
draft code:
MSGraph.psm1. function Invoke-InitializeModule
$script:lstLoadOptions = @(
[PSCustomObject]@{
Name = "20"
Value = "20"
},
[PSCustomObject]@{
Name = "100"
Value = "100"
},
[PSCustomObject]@{
Name = "All"
Value = "All"
}
)
Add-SettingsObject (New-Object PSObject -Property @{
Title = "Load options"
Key = "LoadOptions"
Type = "List"
ItemsSource = $script:lstLoadOptions
DefaultValue = "20"
Description = "How many items load at a time"
}) "GraphGeneral"
possible next steps:
- save this value in the config file
- adopt load data function
prepared PR https://github.com/Micke-K/IntuneManagement/pull/301
Hello,
This is not exactly that I how would have implemented this. I'll think about it :)
I have implemented this in the Next version. However, that is a complete redesign/rewrite so I can't just port the code back.
Settings Catalog is a pain with paging. The return size does not always match the request eg. I set pages size to 10 and requested all pages. The return values I got was 5,0,2,2. It called it many times even though the page size was larger than the return count. Not sure what that is about though.
Cheers!
Closing this as Load options is added to the script.