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

Azure Active Directory ARM Automation How To Powershell

Powershell DSC error – Cannot bind argument to parameter ‘ResourceKey’ 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:1\n+   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.\n\nAnother 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:\n\n    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 406 times, 1 visits today)

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

  1. Hi there, You’ve done a fantastic job. I will definitely digg it and personally suggest to my friends. I’m confident they will be benefited from this site.

Comments are closed.