我正在打电话从这样的Azure自动化帐户下载DSC配置文件;
Export-AzureRmAutomationDscConfiguration -ResourceGroupName "GROUP_NAME" -AutomationAccountName "ACCOUNT_NAME" -Name $CurrentName -Force -OutputFolder $OutputFolder -ErrorAction Stop
但是呼叫失败并出现错误;
Export-AzureRmAutomationDscConfiguration : Unable to deserialize the response.
At line:27 char:9
+ Export-AzureRmAutomationDscConfiguration -Debug -ResourceGrou ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : CloseError: (:) [Export-AzureRmAutomationDscConfiguration], SerializationException
+ FullyQualifiedErrorId : Microsoft.Azure.Commands.Automation.Cmdlet.ExportAzureAutomationDscConfiguration
使用-Debug
参数运行命令显示脚本已部分下载,然后显示消息DATA TRUNCATED DUE TO SIZE
。如果我手动下载脚本,则为99Kb。
这才刚刚开始发生,该文件用于下载非常愉快。那么,为什么现在会发生此错误?
您正在使用旧的AzureRm
模块,尝试到migrate it from AzureRM to Az,然后使用新的Az
命令Export-AzAutomationDscConfiguration
。
Export-AzAutomationDscConfiguration