Open ASMailer opened 3 weeks ago
Hi,
what are the possible include/exclude parameter to define the scope needed documentation? The environment is to large to get all information in one step.
Greetings Andi
Are you're referring to the -IncludeSections / -ExcludeSections parameter as shown below in the documentation?
# Collect information for component Intune as an example
$doc = Get-M365Doc -Components Intune -ExcludeSections "MobileAppDetailed"
I was looking for the possible values for these parameters (because our environment is also way too big), and finally found them here: https://github.com/ThomasKur/M365Documentation/tree/main/PSModule/M365Documentation/Internal/Collector For each -Component there are collector functions defined there which correspond to the -IncludeSections and -ExcludeSections parameters.
The example in the documentation corresponds to the collector function located in the Intune folder named "Get-MobileAppDetailed"
$doc = Get-M365Doc -Components Intune -ExcludeSections "MobileAppDetailed"
https://github.com/ThomasKur/M365Documentation/blob/main/PSModule/M365Documentation/Internal/Collector/Intune/Get-MobileAppDetailed.ps1
So to retrieve the available Sections names: for each collector function in https://github.com/ThomasKur/M365Documentation/tree/main/PSModule/M365Documentation/Internal/Collector just strip "Get-" and ".ps1" from the name of the function.
Thank you for the hint. That helps a lot and makes things clear. I have now seen with the Verbose switch that the reason it doesn't finish is that it retrieves the members from the assignments, already include only one topic.
Do you know if it is somehow possible to suppress the retrieval of the group members?
Greetings, Andi
Not to my knowledge. You would need to edit and execute the internal collector functions in the PS module separately to accomplish that. If you take a look at row 34 in https://github.com/ThomasKur/M365Documentation/blob/main/PSModule/M365Documentation/Internal/Collector/Intune/Get-MdmConfigurationProfile.ps1, you can see that the Get-AssignmentDetail is hardcoded in the function, so you would need to take it out.
Yes, there is no option at the moment. But what is the problem? Are the groups empty or are there old orphan groups referenced?
The problem is the length of the runtime, at some point the token expires and no further member information can be retrieved.
There is simply too much member information and it is not worth retrieving it for documentation purposes. We have a total of 120K devices and a corresponding number of devices/users which are included in the groups.
It would be sufficient for us if only the policy configuration was extracted without details about the assignments (members).
ok, I see and will think about how I can integrate it. I'm already working on a version where the token can be renewed during runtime.
It would be a great if you make a parameter available in the Get-M365Doc, to control this line here ... in the helper function "Get-AssignmentDetailSingle.ps1" ...
So it would report still the group names, in the Doc, and instead of the "Member Count" value something like "Member details suppressed"
At the moment I will help myself to comment out the line until another solution is available.
Thanks in advance
Another option would be to be able to parameterize between transistive and direct member count. The direct member count can be obtained via ...
GET https://graph.microsoft.com/v1.0/groups/02bd9fd6-8f93-4758-87c3-1fb73740a315/members/$count Header: ConsistencyLevel: eventual
The workaround has been effective for us.
Just for information, we noticed an another issue when generating the ConfigurationProfile documentation, which resulted in a 50 MB document spanning 21,000 pages. This was due to properties such as Payload, Description, WallpaperImage, trustedRootCertificate, configurationXML, and startMenuLayoutEdgeAssetXml, ... "Payload" was the primary issue.
To address this, we modified the "Get-MdmConfigurationProfile" function by truncating all strings longer than 100 characters and removing the image properties. These changes successfully reduced the file size to 1 MB, making the Word document manageable again.
Hi,
what are the possible include/exclude parameter to define the scope needed documentation? The environment is to large to get all information in one step.
Greetings Andi