Powershell DSC error – Cannot bind argument to parameter ‘ResourceKey’ because it is an empty string.

Powershell DSC error – Cannot bind argument to parameterResourceKey’ because it is an empty string.

 

Background –  I was trying to deploy azure dsc extension to add ADDS role on new azure vm using ARM template (extension resource under compute resource).

 

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

Microsoft.Powershell.DSC’. Error message: ”The DSC Extension received an

incorrect input: Index operation failed; the array index evaluated to null. An

exception was raised while processing Node ‘localhost’: Index operation

failed; the array index evaluated to null.nAt

C:\Packages\Plugins\Microsoft.Powershell.DSC\2.75.0.0\DSCWork\dcDc.ps1

(1).0\dcDS.ps1

char:1n+   Node Index operation failed; the array index

evaluated to null. Cannot bind argument to parameter ‘ResourceKey’ because it

is an empty string. Exception calling ”InvokeWithContext” with ”2”

argument(s): ”Cannot bind argument to parameter ‘ResourceKey’ because it is

an empty string.” Cannot bind argument to parameter ‘ResourceKey’ because it

is an empty string.nnAnother common error is to specify parameters of type

PSCredential without an explicit type. Please be sure to use a typed parameter

in DSC Configuration, for example:nn    configuration Example {n

param([PSCredential] $UserAccount)n        …n    }.nPlease correct the

input and retry executing the extension.”.”

 

Solution :-  in my case i forgot to pass domain name parameter which is used by DSC extension , so just added value in domainname parameter in arm parameter file and than it.

 

(Visited 11 times, 1 visits today)

Add a Comment

Facebook