Export-AzureRmAutomationDscConfiguration无法反序列化响应

问题描述 投票:0回答:1

我正在打电话从这样的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。

这才刚刚开始发生,该文件用于下载非常愉快。那么,为什么现在会发生此错误?

azure powershell azure-powershell dsc
1个回答
0
投票

您正在使用旧的AzureRm模块,尝试到migrate it from AzureRM to Az,然后使用新的Az命令Export-AzAutomationDscConfiguration

Export-AzAutomationDscConfiguration
© www.soinside.com 2019 - 2024. All rights reserved.