Hi all,
I'm currently attempting to extract Auditlog records via Powershell, however I'm regularly getting errors in relation to a JSON conversion error. I am using a slightly modified version of this script. The small changes relate to date periods, and an addition of a User variable. I'm currently running EXO v3.0.0 too. The error found in the Powershell window along with the error within the cmdlet log can be found below.
Powershell window error
ConvertFrom-Json : Invalid JSON primitive: .
At C:\Users\...\AppData\Local\Temp\tmpEXO_0q1mvkwr.0ub\tmpEXO_0q1mvkwr.0ub.psm1:576 char:35
+ ... etailsToPSObject = ConvertFrom-Json $ErrorObject.ErrorDetails.Message
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (:) [ConvertFrom-Json], ArgumentException
+ FullyQualifiedErrorId : System.ArgumentException,Microsoft.PowerShell.Commands.ConvertFromJsonCommand
cmdlet Error Log message
Invalid JSON primitive: .- at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializePrimitiveObject() at System.Web.Script.Serialization.JavaScriptObjectDeserializer.DeserializeInternal(Int32 depth) at System.Web.Script.Serialization.JavaScriptObjectDeserializer.BasicDeserialize(String input Int32 depthLimit JavaScriptSerializer serializer) at System.Web.Script.Serialization.JavaScriptSerializer.Deserialize(JavaScriptSerializer serializer String input Type type Int32 depthLimit) at Microsoft.PowerShell.Commands.JsonObject.ConvertFromJson(String input ErrorRecord& error) at Microsoft.PowerShell.Commands.ConvertFromJsonCommand.ConvertFromJsonHelper(String input) at System.Management.Automation.CommandProcessorBase.Complete();
I'm assuming the error relates to the EXO module itself, but I'm unsure.