{"action":"created","issue":{"url":"https://api.github.com/repos/PowerShell/xActiveDirectory/issues/127","repository_url":"https://api.github.com/repos/PowerShell/xActiveDirectory","labels_url":"https://api.github.com/repos/PowerShell/xActiveDirectory/issues/127/labels{/name}","comments_url":"https://api.github.com/repos/PowerShell/xActiveDirectory/issues/127/comments","events_url":"https://api.github.com/repos/PowerShell/xActiveDirectory/issues/127/events","html_url":"https://github.com/PowerShell/xActiveDirectory/issues/127","id":191411742,"number":127,"title":"Deployment through ARM Template Fails: The specified argument 'NewDomain' was not recognized","user":{"login":"vhusker","id":6845844,"avatar_url":"https://avatars.githubusercontent.com/u/6845844?v=3","gravatar_id":"","url":"https://api.github.com/users/vhusker","html_url":"https://github.com/vhusker","followers_url":"https://api.github.com/users/vhusker/followers","following_url":"https://api.github.com/users/vhusker/following{/other_user}","gists_url":"https://api.github.com/users/vhusker/gists{/gist_id}","starred_url":"https://api.github.com/users/vhusker/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vhusker/subscriptions","organizations_url":"https://api.github.com/users/vhusker/orgs","repos_url":"https://api.github.com/users/vhusker/repos","events_url":"https://api.github.com/users/vhusker/events{/privacy}","received_events_url":"https://api.github.com/users/vhusker/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":18,"created_at":"2016-11-24T01:01:56Z","updated_at":"2016-12-03T16:33:18Z","closed_at":null,"body":"I am deploying a VM through an ARM Template using the DSC Extension.  I am using the xADDomain resource to build the domain.  When doing so the domain is built (and I can login as a domain user), but the deployment throws an error at the end and Server Manager still thinks that I need to promote the server to a DC.  Server OS is 2016.  xActiveDirectory Module Version is 2.14.0.0.\r\n\r\nPSVersionTable:\r\n`Name                           Value                                                                                                                           \r\n----                           -----                                                                                                                           \r\nPSVersion                      5.1.14393.206                                                                                                                   \r\nPSEdition                      Desktop                                                                                                                         \r\nPSCompatibleVersions           {1.0, 2.0, 3.0, 4.0...}                                                                                                         \r\nBuildVersion                   10.0.14393.206                                                                                                                  \r\nCLRVersion                     4.0.30319.42000                                                                                                                 \r\nWSManStackVersion              3.0                                                                                                                             \r\nPSRemotingProtocolVersion      2.3                                                                                                                             \r\nSerializationVersion           1.1.0.1 `\r\n\r\nDeployment Failure from Azure Portal:\r\n`{\r\n  \"status\": \"Failed\",\r\n  \"error\": {\r\n    \"code\": \"ResourceDeploymentFailure\",\r\n    \"message\": \"The resource operation completed with terminal provisioning state 'Failed'.\",\r\n    \"details\": [\r\n      {\r\n        \"code\": \"VMExtensionProvisioningError\",\r\n        \"message\": \"VM has reported a failure when processing extension 'Microsoft.PowerShell.DSC'. Error message: \\\"DSC Configuration 'FirstDC' completed with error(s). Following are the first few: Verification of prerequisites for Domain Controller promotion failed. The specified argument 'NewDomain' was not recognized.\\r\\n The PowerShell DSC resource '[xADDomain]BuildDomain' with SourceInfo 'C:\\\\Packages\\\\Plugins\\\\Microsoft.Powershell.DSC\\\\2.20.0.0\\\\DSCWork\\\\FirstDCAzure.ps1.0\\\\FirstDCAzure.ps1::53::9::xADDomain' threw one or more non-terminating errors while running the Set-TargetResource functionality. These errors are logged to the ETW channel called Microsoft-Windows-DSC/Operational. Refer to this channel for more details. The SendConfigurationApply function did not succeed.\\\".\"\r\n      }\r\n    ]\r\n  }\r\n}`\r\n\r\nEvent Log Error:\r\n`Job {AD7F737F-B1DF-11E6-A941-000D3A9339BA} : \r\nMIResult: 1\r\nError Message: Verification of prerequisites for Domain Controller promotion failed. The specified argument 'NewDomain' was not recognized.\r\n\r\nMessage ID: Test.VerifyDcPromoCore.DCPromo.General.77,Microsoft.DirectoryServices.Deployment.PowerShell.Commands.InstallADDSForestCommand\r\nError Category: 0\r\nError Code: 1\r\nError Type: MI`\r\n\r\nDSC Extension in the ARM Template.  Should also mention here that when I tried to use a parameter of type string for the domain name, it was failing to pass through to DSC and was throwing an error that the domain name was in an invalid format.:\r\n`{\r\n\t\t\t\"type\": \"Microsoft.Compute/virtualMachines/extensions\",\r\n\t\t\t\"name\": \"[concat(variables('vmName1'), '/Microsoft.PowerShell.DSC')]\",\r\n\t\t\t\"apiVersion\": \"2015-06-15\",\r\n\t\t\t\"location\": \"[parameters('location')]\",\r\n\t\t\t\"dependsOn\": [\r\n\t\t\t\t\"[concat('Microsoft.Compute/virtualMachines/', variables('vmName1'))]\"\r\n\t\t\t],\r\n\t\t\t\"properties\": {\r\n\t\t\t\t\"publisher\": \"Microsoft.Powershell\",\r\n\t\t\t\t\"type\": \"DSC\",\r\n\t\t\t\t\"typeHandlerVersion\": \"2.20\",\r\n\t\t\t\t\"settings\": {\r\n\t\t\t\t\t\"wmfVersion\": \"latest\",\r\n\t\t\t\t\t\"configuration\":{\r\n\t\t\t\t\t\t\"url\": \"[variables('modulesURL')]\",\r\n\t\t\t\t\t\t\"script\": \"[variables('dscScript')]\",\r\n\t\t\t\t\t\t\"function\": \"[variables('dscFunction')]\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"configurationArguments\":{\r\n\t\t\t\t\t\t\"domainName\": \"valhalla.com\"\r\n\t\t\t\t\t},\r\n\t\t\t\t\t\"privacy\":{\r\n\t\t\t\t\t\t\"dataCollection\": \"enable\"\r\n\t\t\t\t\t}\r\n\t\t\t\t},\r\n\t\t\t\t\"protectedSettings\": {\r\n\t\t\t\t\t\"configurationArguments\":{\r\n\t\t\t\t\t\t\"AdminCreds\":{\r\n\t\t\t\t\t\t\t\"userName\": \"parameters[('adminUsername')]\",\r\n\t\t\t\t\t\t\t\"password\": \"parameters[('adminPassword')]\"\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}`\r\n\r\nDSC Configuration:\r\n`xADDomain BuildDomain{\r\n            DomainName = $DomainName\r\n\r\n            DomainAdministratorCredential = $DomainCreds\r\n            SafemodeAdministratorPassword = $DomainCreds\r\n            DependsOn = \"[WindowsFeature]ADDSInstall\"\r\n        }`"},"comment":{"url":"https://api.github.com/repos/PowerShell/xActiveDirectory/issues/comments/264649648","html_url":"https://github.com/PowerShell/xActiveDirectory/issues/127#issuecomment-264649648","issue_url":"https://api.github.com/repos/PowerShell/xActiveDirectory/issues/127","id":264649648,"user":{"login":"oradcliffe","id":10674829,"avatar_url":"https://avatars.githubusercontent.com/u/10674829?v=3","gravatar_id":"","url":"https://api.github.com/users/oradcliffe","html_url":"https://github.com/oradcliffe","followers_url":"https://api.github.com/users/oradcliffe/followers","following_url":"https://api.github.com/users/oradcliffe/following{/other_user}","gists_url":"https://api.github.com/users/oradcliffe/gists{/gist_id}","starred_url":"https://api.github.com/users/oradcliffe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/oradcliffe/subscriptions","organizations_url":"https://api.github.com/users/oradcliffe/orgs","repos_url":"https://api.github.com/users/oradcliffe/repos","events_url":"https://api.github.com/users/oradcliffe/events{/privacy}","received_events_url":"https://api.github.com/users/oradcliffe/received_events","type":"User","site_admin":false},"created_at":"2016-12-03T16:33:18Z","updated_at":"2016-12-03T16:33:18Z","body":"@vhusker This guy is using typehandlerversion 2.8 - https://blog.kloud.com.au/2016/01/11/easy-debugging-of-powershell-dsc-for-azure-virtual-machines/"}}
{"actor":{"display_login":"oradcliffe"}}