-
Notifications
You must be signed in to change notification settings - Fork 4.1k
Open
Labels
AutomationService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.customer-reported
Description
Description
I am facing the issue of Unable to deserialize the response. while using the Export-AzAutomationDscNodeReportContent cmdlet. I even tried to update the AZ module to it's latest version, still facing the same issue.
Steps to reproduce
$Node = Get-AzAutomationDscNode -ResourceGroupName "RG01" -AutomationAccountName "AC01" -Name "NA01"
$Report = Get-AzAutomationDscNodeReport -ResourceGroupName "RG01" -AutomationAccountName "AC01" -NodeId "xxxxxxxx-c7d8-11e8-a941-xxxxxxxxx" -Latest
$Report | Export-AzAutomationDscNodeReportContent -OutputFolder "C:\Users\sss\test.txt"
Environment data
$PSVersionTable
Name Value
---- -----
PSVersion 5.1.16299.1146
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.16299.1146
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
Module versions
Get-Module Az.Automation -ListAvailable
Directory: C:\Program Files\WindowsPowerShell\Modules
ModuleType Version Name ExportedCommands
---------- ------- ---- ----------------
Script 1.3.0 Az.Automation {Get-AzAutomationHybridWorker...
Script 1.2.2 Az.Automation {Get-AzAutomationHybridWorker...
Script 1.0.0 Az.Automation {Get-AzAutomationHybridWorker...
Error output
Resolve-AzError
HistoryId: 2
Message : Unable to deserialize the response.
StackTrace : at Microsoft.Azure.Management.Automation.NodeReportsOperations.<GetCon
tentWithHttpMessagesAsync>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown
---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebu
ggerNotification(Task task)
at Microsoft.Azure.Management.Automation.NodeReportsOperationsExtensio
ns.<GetContentAsync>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown
---
at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebu
ggerNotification(Task task)
at Microsoft.Azure.Management.Automation.NodeReportsOperationsExtensio
ns.GetContent(INodeReportsOperations operations, String
resourceGroupName, String automationAccountName, String nodeId, String
reportId)
at Microsoft.Azure.Commands.Automation.Common.AutomationPSClient.GetDs
cNodeReportContent(String resourceGroupName, String
automationAccountName, Guid nodeId, Guid reportId, String outputFolder,
Boolean overwriteExistingFile)
at Microsoft.Azure.Commands.Automation.Cmdlet.ExportAzureAutomationDsc
NodeReportContent.ExecuteCmdlet()
at Microsoft.WindowsAzure.Commands.Utilities.Common.AzurePSCmdlet.Proc
essRecord()
Exception : Microsoft.Rest.SerializationException
InvocationInfo : {Export-AzAutomationDscNodeReportContent}
Line : $Report | Export-AzAutomationDscNodeReportContent -OutputFolder
"C:\Users\nh411mf\Desktop"
Position : At line:3 char:11
+ $Report | Export-AzAutomationDscNodeReportContent -OutputFolder "C:\U
...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 2
Message : Additional text encountered after finished reading JSON content: {. Path
'', line 3, position 0.
StackTrace : at Newtonsoft.Json.JsonTextReader.Read()
at Newtonsoft.Json.Serialization.JsonSerializerInternalReader.Deserial
ize(JsonReader reader, Type objectType, Boolean checkAdditionalContent)
at Newtonsoft.Json.JsonSerializer.DeserializeInternal(JsonReader
reader, Type objectType)
at
Microsoft.Rest.Serialization.SafeJsonConvert.DeserializeObject[T](String
json, JsonSerializerSettings settings)
at Microsoft.Azure.Management.Automation.NodeReportsOperations.<GetCon
tentWithHttpMessagesAsync>d__7.MoveNext()
Exception : Newtonsoft.Json.JsonReaderException
InvocationInfo : {Export-AzAutomationDscNodeReportContent}
Line : $Report | Export-AzAutomationDscNodeReportContent -OutputFolder
"C:\Users\nh411mf\Desktop"
Position : At line:3 char:11
+ $Report | Export-AzAutomationDscNodeReportContent -OutputFolder "C:\U
...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
HistoryId : 2
sg3-141-592
Metadata
Metadata
Assignees
Labels
AutomationService AttentionThis issue is responsible by Azure service team.This issue is responsible by Azure service team.customer-reported