Running DSC labs, and yesterday I set up DSC Pull server nr 3 (DSC03) according to my documentation. Windows 2012 R2, Full Windows Update and:
Add-WindowsFeature Dsc-Service
winrm quickconfig
& ‘C:\Filer\Windows Management Framework 5.0 ProdPreview\Win8.1AndW2K12R2-KB3066437-x64.msu’
Find-DscResource -moduleName xPSDesiredStateConfiguration
Install-Module xPSDesiredStateConfiguration -Verbose
Everything as expected.
Then I was support to configure DSC Pull service, and…
`
PSDesiredStateConfiguration\Node : The variable ‘$notAllowedValue’ cannot be retrieved because it has not been set.
At C:\Filer.old\DSC02\DSC\Configurations\DSC dsc02.ad.uit.no.ps1:8 char:5
-
Node $ComputerName -
~~~~- CategoryInfo : InvalidOperation: (notAllowedValue:String) [PSDesiredStateConfiguration\node], ParentContainsErrorRecordException
- FullyQualifiedErrorId : VariableIsUndefined,PSDesiredStateConfiguration\node
PSDesiredStateConfiguration\Node : An exception was raised while processing Node ‘dsc03’: Index operation failed; the array index evaluated to null.
At C:\Filer.old\DSC02\DSC\Configurations\DSC dsc02.ad.uit.no.ps1:8 char:5
- Node
At C:\Filer.old\DSC02\DSC\Configurations\DSC dsc02.ad.uit.no.ps1:8 char:5 -
Node $ComputerName -
~~~~- CategoryInfo : InvalidOperation: (
[Write-Error], InvalidOperationException - FullyQualifiedErrorId : FailToProcessNode,PSDesiredStateConfiguration\node
Update-DependsOn : Index operation failed; the array index evaluated to null.
At C:\windows\system32\windowspowershell\v1.0\Modules\PSDesiredStateConfiguration\PSDesiredStateConfiguration.psm1:2181 char:17
- CategoryInfo : InvalidOperation: (
- … Update-DependsOn $Script:NodesInThisConfiguration[$mofNod …
-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~- CategoryInfo : InvalidOperation: (
[Update-DependsOn], RuntimeException - FullyQualifiedErrorId : NullArrayIndex,Update-DependsOn
- CategoryInfo : InvalidOperation: (
`
Googling some of the keywords gives me nothing, like $notAllowedValue.
The configuration is pretty simple, it is standard “copy-paste code” from the net.
`
configuration NewPullServer
{
param ( [string]$ComputerName = ‘localhost’ )
Import-DSCResource -ModuleName xPSDesiredStateConfiguration
#Import-DscResource –ModuleName ‘PSDesiredStateConfiguration’
Node $ComputerName
{
WindowsFeature DSCServiceFeature
{
Ensure = “Present”
Name = “DSC-Service”
}
xDscWebService PSDSCPullServer
{
Ensure = “Present”
EndpointName = “PSDSCPullServer”
Port = 8080
PhysicalPath = “$env:SystemDrive\inetpub\wwwroot\PSDSCPullServer”
CertificateThumbPrint = “AllowUnencryptedTraffic”
ModulePath = “$env:PROGRAMFILES\WindowsPowerShell\DscService\Modules”
ConfigurationPath = “$env:PROGRAMFILES\WindowsPowerShell\DscService\Configuration”
State = “Started”
DependsOn = “[WindowsFeature]DSCServiceFeature”
}
xDscWebService PSDSCComplianceServer
{
Ensure = “Present”
EndpointName = “PSDSCComplianceServer”
Port = 9080
PhysicalPath = “$env:SystemDrive\inetpub\wwwroot\PSDSCComplianceServer”
CertificateThumbPrint = “AllowUnencryptedTraffic”
State = “Started”
IsComplianceServer = $true
DependsOn = (“[WindowsFeature]DSCServiceFeature”,”[xDSCWebService]PSDSCPullServer”)
}
}
}
#This line actually calls the function above to create the MOF file.
NewPullServer –ComputerName dsc03 -OutputPath ‘C:\DSC\DSC Server’
#Start-DscConfiguration -Path 'C:\DSC\DSC Server' –Wait -Verbose
#Start-Process -FilePath http://dsc03:8080/PSDSCPullServer.svc/
`
I am pretty lost here. I guess it is a really simple error, but I cannot find it.
Any ideas?