I’m trying to deploy a new DSC pull server to replace our current one that is in production. When trying to deploy a basic script like this.
# Step 1 Install xPSDesiredStateConfiguration
Install-Module -Name xPSDesiredStateConfiguration
# Step 2
# Create the Pull Server.
Configuration CreatePullServer {
param (
[string[]]$ComputerName = 'localhost'
)
Import-DSCResource -ModuleName xPSDesiredStateConfiguration -ModuleVersion 9.2.1
Import-DSCResource –ModuleName PSDesiredStateConfiguration
Node $ComputerName {
WindowsFeature DSCServiceFeature {
Ensure = "Present"
Name = "DSC-Service"
}
xDscWebService PSDSCPullServer {
Ensure = "Present"
UseSecurityBestPractices = 0
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"
}
}
}
#Creates the .mof file
CreatePullServer
# Apply the Pull Server configuration to the Pull Server
Start-DscConfiguration .\CreatePullServer -Wait -Verbose
I’m getting error messages.
PS D:\DSC\_setup> Start-DscConfiguration .\CreatePullServer -Wait -Verbose
VERBOSE: Perform operation 'Invoke CimMethod' with following parameters, ''methodName' = SendConfigurationApply,'className' = MSFT_DSCLocalConfigurationManager,'namespaceName' = root/Microsoft/Windows/DesiredStateConfiguration'.
VERBOSE: An LCM method call arrived from computer ******-DSC02 with user sid ****-1167487308-122181.
VERBOSE: [SYT-PENM-DSC02]: LCM: [ Start Set ]
VERBOSE: [SYT-PENM-DSC02]: LCM: [ End Set ]
The only way DSC Partial Configurations can be used in Push mode is if the Publish-DscConfiguration Cmdlet is used. No other push cmdlet is supported. To avoid this error, either set a metaconfiguration without partial configurations, or use the Publish-DscConfiguration cmdlet to deploy your partial configuration.
+ CategoryInfo : NotImplemented: (root/Microsoft/...gurationManager:String) [], CimException
+ FullyQualifiedErrorId : MI RESULT 7
+ PSComputerName : localhost
VERBOSE: Operation 'Invoke CimMethod' complete.
VERBOSE: Time taken for configuration job to complete is 0.908 seconds
PS D:\DSC\_setup>
I’ve tried a few various setup scripts and I seem to run into the same issue every time. I know that I can push the configuration but I’m not really sure what that achieves as the server isn’t complete yet.
Looking online I can’t see many topic that’s that are less then five years old so any help would be appreciated. I’m not looking for Azure DSC at this time either.