I did push some configs to the client servers early in my testing and was able to run Get-DscConfiguration successfully then, its after the config was pulled that I started getting the error. Here is a cleaned up version of my script so far:
$ConfigurationData = @{
AllNodes = @(
@{NodeName = ‘EQDEVOPS1’;Role=@(‘DSCPullServer’)}
@{NodeName = ‘EQDEVOPS2’;Role=@(‘Web’,‘DevInt’)}
@{NodeName = ‘EQDEVOPS3’;Role=@(‘Web’,‘Alpha’)}
)
}
Configuration EqConfig {
Import-DSCResource -ModuleName xPSDesiredStateConfiguration
Node $AllNodes.NodeName {
switch ($Node.Role) {
'DSCPullServer' {
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 = 8090
PhysicalPath = "$env:SystemDrive\inetpub\wwwroot\PSDSCComplianceServer"
CertificateThumbPrint = "AllowUnencryptedTraffic"
State = "Started"
IsComplianceServer = $true
DependsOn = ("[WindowsFeature]DSCServiceFeature","[xDSCWebService]PSDSCPullServer")
}
} #DSCPullServer
'Web' {
WindowsFeature eq_Web-Server {
Ensure = "Present"
Name = "Web-Server"
}
WindowsFeature eq_Web-WebServer {
Ensure = "Present"
Name = "Web-WebServer"
DependsOn = "[WindowsFeature]eq_Web-Server"
}
WindowsFeature eq_Web-Common-Http {
Ensure = "Present"
Name = "Web-Common-Http"
DependsOn = "[WindowsFeature]eq_Web-WebServer"
}
WindowsFeature eq_Web-Static-Content {
Ensure = "Present"
Name = "Web-Static-Content"
DependsOn = "[WindowsFeature]eq_Web-Common-Http"
}
WindowsFeature eq_Web-Default-Doc {
Ensure = "Present"
Name = "Web-Default-Doc"
DependsOn = "[WindowsFeature]eq_Web-Common-Http"
}
WindowsFeature eq_Web-Dir-Browsing {
Ensure = "Present"
Name = "Web-Dir-Browsing"
DependsOn = "[WindowsFeature]eq_Web-Common-Http"
}
WindowsFeature eq_Web-Http-Errors {
Ensure = "Present"
Name = "Web-Http-Errors"
DependsOn = "[WindowsFeature]eq_Web-Common-Http"
}
WindowsFeature eq_Web-Health {
Ensure = "Present"
Name = "Web-Health"
DependsOn = "[WindowsFeature]eq_Web-WebServer"
}
WindowsFeature eq_Web-Http-Logging {
Ensure = "Present"
Name = "Web-Http-Logging"
DependsOn = "[WindowsFeature]eq_Web-Health"
}
WindowsFeature eq_Web-Request-Monitor {
Ensure = "Present"
Name = "Web-Request-Monitor"
DependsOn = "[WindowsFeature]eq_Web-Health"
}
WindowsFeature eq_Web-Security {
Ensure = "Present"
Name = "Web-Security"
DependsOn = "[WindowsFeature]eq_Web-WebServer"
}
WindowsFeature eq_Web-Filtering {
Ensure = "Present"
Name = "Web-Filtering"
DependsOn = "[WindowsFeature]eq_Web-Security"
}
WindowsFeature eq_Web-Windows-Auth {
Ensure = "Present"
Name = "Web-Windows-Auth"
DependsOn = "[WindowsFeature]eq_Web-Security"
}
WindowsFeature eq_Web-Performance {
Ensure = "Present"
Name = "Web-Performance"
DependsOn = "[WindowsFeature]eq_Web-WebServer"
}
WindowsFeature eq_Web-Stat-Compression {
Ensure = "Present"
Name = "Web-Stat-Compression"
DependsOn = "[WindowsFeature]eq_Web-Performance"
}
WindowsFeature eq_Web-Dyn-Compression {
Ensure = "Present"
Name = "Web-Dyn-Compression"
DependsOn = "[WindowsFeature]eq_Web-Performance"
}
WindowsFeature eq_Web-App-Dev {
Ensure = "Present"
Name = "Web-App-Dev"
DependsOn = "[WindowsFeature]eq_Web-WebServer"
}
WindowsFeature eq_Web-ISAPI-Ext {
Ensure = "Present"
Name = "Web-ISAPI-Ext"
DependsOn = "[WindowsFeature]eq_Web-App-Dev"
}
WindowsFeature eq_Web-ISAPI-Filter {
Ensure = "Present"
Name = "Web-ISAPI-Filter"
DependsOn = "[WindowsFeature]eq_Web-App-Dev"
}
WindowsFeature eq_Web-Net-Ext {
Ensure = "Present"
Name = "Web-Net-Ext"
DependsOn = "[WindowsFeature]eq_Web-Filtering"
}
WindowsFeature eq_Web-Asp-Net {
Ensure = "Present"
Name = "Web-Asp-Net"
DependsOn = @("[WindowsFeature]eq_Web-Filtering", "[WindowsFeature]eq_Web-Default-Doc", "[WindowsFeature]eq_Web-Net-Ext", "[WindowsFeature]eq_Web-ISAPI-Ext", "[WindowsFeature]eq_Web-ISAPI-Filter")
}
WindowsFeature eq_Web-Mgmt-Tools {
Ensure = "Present"
Name = "Web-Mgmt-Tools"
DependsOn = "[WindowsFeature]eq_Web-Server"
}
WindowsFeature eq_Web-Mgmt-Console {
Ensure = "Present"
Name = "Web-Mgmt-Console"
DependsOn = "[WindowsFeature]eq_Web-Mgmt-Tools"
}
WindowsFeature eq_Web-Mgmt-Compat {
Ensure = "Present"
Name = "Web-Mgmt-Compat"
DependsOn = "[WindowsFeature]eq_Web-Mgmt-Tools"
}
WindowsFeature eq_Web-Metabase {
Ensure = "Present"
Name = "Web-Metabase"
DependsOn = "[WindowsFeature]eq_Web-Mgmt-Compat"
}
WindowsFeature eq_Web-Lgcy-Mgmt-Console {
Ensure = "Present"
Name = "Web-Lgcy-Mgmt-Console"
DependsOn = "[WindowsFeature]eq_Web-Mgmt-Compat"
}
File ServerBox {
Ensure = "Present"
Type = "Directory"
Recurse = $true
MatchSource = $true
Force = $true
Checksum = "SHA-256"
SourcePath = "\\EQDEVOPS1\ServerBox"
DestinationPath = "D:\ServerBox"
}
} #Web
'DevInt' {
File eq_DevInt {
Ensure = "Present"
Type = "Directory"
Recurse = $true
MatchSource = $true
Force = $true
Checksum = "SHA-256"
SourcePath = "\\EQDEVOPS1\Sites\DevInt"
DestinationPath = "D:\ServerBox\Sites\wwwroot"
DependsOn = "[File]ServerBox"
}
} #DevInt
'Alpha' {
File eq_Alpha {
Ensure = "Present"
Type = "Directory"
Recurse = $true
MatchSource = $true
Force = $true
Checksum = "SHA-256"
SourcePath = "\\EQDEVOPS1\Sites\Alpha"
DestinationPath = "D:\ServerBox\Sites\wwwroot"
DependsOn = "[File]ServerBox"
}
} #Alpha
} #end switch
} #Node
} #Configuration
EqConfig -ConfigurationData $ConfigurationData
Function Get-ComputerGuid {
param(
[Parameter(Mandatory=$true)]
[string]$ComputerName
)
process {
(guid.FindOne().Properties[“objectguid”][0]).Guid
}
}
$DSCPullFolder = “\cadevops1\C`$\Program Files\WindowsPowerShell\DscService\Configuration”
Get-ChildItem .\EqConfig* -Filter *.mof | ForEach-Object {
$guidMofFile = “$DSCPullFolder$(Get-ComputerGuid $.BaseName).mof"
$newMof = copy $.FullName $guidMofFile -PassThru -Force
$newHash = (Get-FileHash $newMof).hash
[System.IO.File]::WriteAllText(”$newMof.checksum",$newHash)
}
Configuration EqLocalConfig {
Node $AllNodes.NodeName {
LocalConfigurationManager {
AllowModuleOverwrite = ‘True’
ConfigurationID = $(Get-ComputerGuid $nodeName)
ConfigurationModeFrequencyMins = 15
ConfigurationMode = ‘ApplyAndAutoCorrect’
RebootNodeIfNeeded = ‘True’
RefreshMode = ‘PULL’
DownloadManagerName = ‘WebDownloadManager’
DownloadManagerCustomData = (@{ServerUrl = “http://eqdevops1:8080/psdscpullserver.svc”; AllowUnsecureConnection = ‘True’})
}
}
}
EqLocalConfig -ConfigurationData $ConfigurationData
Set-DscLocalConfigurationManager -Path .\EqLocalConfig -Verbose