DSC配置路径中放置了多余的字符-Azure PS

时间:2018-11-17 18:55:00

标签: json azure powershell dsc

我正在尝试找出为什么我在下面看到错误; configuration.ps1文件的路径应为configuration \ configuration.ps1,但是由于将其读取为configuration.0 \ configuration.ps1而失败。

下面是整个错误消息,还有其他人遇到吗?

"status": "Failed",
  "error": {
    "code": "ResourceDeploymentFailure",
    "message": "The resource operation completed with terminal provisioning state 'Failed'.",
    "details": [
      {
        "code": "VMExtensionProvisioningError",
        "message": "VM has reported a failure when processing extension 'CreateADPDC'. Error message: \"The DSC Extension received an incorrect input: An error occurred while 
executing script or module 'configuration.ps1':  The term 'C:\\Packages\\Plugins\\Microsoft.Powershell.DSC\\2.77.0.0\\bin\\..\\DSCWork\\configuration.0\\configuration.ps1' is not 
recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try 
again..\nPlease correct the input and retry executing the extension.\"."
      }
    ]
  }
}'
At line:4 char:14
+ ...             New-AzureRmResourceGroupDeployment -Name "coredeployment1 ...
+                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [New-AzureRmResourceGroupDeployment], Exception
    + FullyQualifiedErrorId : Microsoft.Azure.Commands.ResourceManager.Cmdlets.Implementation.NewAzureResourceGroupDeploymentCmdlet

New-AzureRmResourceGroupDeployment : 18:31:08 - VM has reported a failure when processing extension 'CreateADPDC'. Error message: "The DSC Extension received an incorrect input: An 
error occurred while executing script or module 'configuration.ps1':  The term 
'C:\Packages\Plugins\Microsoft.Powershell.DSC\2.77.0.0\bin\..\DSCWork\configuration.0\configuration.ps1' is not recognized as the name of a cmdlet, function, script file, or operable 
program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again..
Please correct the input and retry executing the extension.".

预先感谢:)

0 个答案:

没有答案