ADRecon is a tool which gathers information about the Active Directory and generates a report which can provide a holistic picture of the current state of the target AD environment.
Choosing options to export to JSON gives XML output.
The JSON object is a string which does not have a .Save() method, it looks like this line was copied from the XML option where the XML object does have a .Save() method, so I just copied this from the HTML function and it works correctly.
Replace line 4159 in Function Export-ADRJSON, originally:
This looks like it was just an oversight while copying and pasting the XML function, but the Export-ADRJSON function was actually never called from anywhere in the script.
Replace line 4316 in Function Export-ADR, originally:
Choosing options to export to JSON gives XML output.
The JSON object is a string which does not have a .Save() method, it looks like this line was copied from the XML option where the XML object does have a .Save() method, so I just copied this from the HTML function and it works correctly.
Replace line 4159 in Function Export-ADRJSON, originally:
with:
This looks like it was just an oversight while copying and pasting the XML function, but the Export-ADRJSON function was actually never called from anywhere in the script.
Replace line 4316 in Function Export-ADR, originally:
with: