Hej, this is actually not the direct answer to your question, but this way seems to be easier for me:
I would use SYDI server, to be more precise sydi-wrapper.vbs and sydi-audit-localgroups.vbs tools.
First tool will allow you to collect reports from a list of servers in excel file or from a specific OU in a domain tree.
sydi-wrapper description
The script is included in the tools directory of SYDI Server. It allows to run SYDI against multiple computers. For that purpose you need to edit script for your configuration, specifying gathering options i.e. WMI-options, export formats, location options.
Using the script:
Cscript.exe sydi-wrapper.vbs [options]
Examples
cscript.exe sydi-wrapper.vbs -tComputers.csv
cscript.exe sydi-wrapper.vbs -aDC=contoso,DC=com
cscript.exe sydi-wrapper.vbs -a”OU=Member Servers,DC=contoso,DC=com”
sydi-audit-localgroups description
The script is included in the tools directory of SYDI Server. It works in the same way as SYDI Overview does. It parses SYDI-Server XML files and creates an Excel file containing a list of all your local groups on your client computers and member servers.
Using the script:
Cscript.exe sydi-audit-localgroups.vbs -xC:\SYDI\Output
Examples
cscript.exe sydi-overview.vbs -x"D:\sydi output"
You will get an excel file with all of the groups available on the 1st sheet.
If you click on the link opposite to the Group Name you will have all the local users\groups listed for every server.
*The scripts will run and attempt to connect under logged in account, make sure this is domain one.