Last active
December 13, 2016 20:15
-
-
Save bobalob/2a69b943c16e8f0392c468bc7c22ae20 to your computer and use it in GitHub Desktop.
Example to configure the LCM for pulling partial configurations using the ConfigurationID method
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[DSCLocalConfigurationManager()] | |
configuration PullClientConfigNames | |
{ | |
Node $AllNodes.NodeName | |
{ | |
Settings | |
{ | |
RefreshMode = 'Pull' | |
RefreshFrequencyMins = 30 | |
RebootNodeIfNeeded = $true | |
ConfigurationID = $AllNodes.ConfigurationID | |
} | |
ConfigurationRepositoryWeb Master-PullSrv | |
{ | |
ServerURL = 'https://pullserver.example.com:8080/PSDSCPullServer.svc' | |
CertificateID = 'SERVER-CERT-THUMBPRINT' | |
AllowUnsecureConnection = $False | |
} | |
PartialConfiguration "ServerBuild" | |
{ | |
Description = "Server Build" | |
ConfigurationSource = @("[ConfigurationRepositoryWeb]Master-PullSrv") | |
} | |
PartialConfiguration "AppConfig" | |
{ | |
Description = "Server Build" | |
ConfigurationSource = @("[ConfigurationRepositoryWeb]Master-PullSrv") | |
DependsOn = "[PartialConfiguration]ServerBuild" | |
} | |
} | |
} | |
$MyNodes = | |
@{ | |
AllNodes = | |
@( | |
@{ | |
NodeName = "pullclient.example.com" | |
ConfigurationID = "***use New-Guid to generate***" | |
} | |
); | |
} | |
PullClientConfigNames -OutPutPath C:\DSC\PullClient -ConfigurationData $MyNodes | |
Set-DscLocalConfigurationManager -Path C:\DSC\PullClient -verbose | |
Update-DscConfiguration -wait -verbose -ComputerName pullclient.example.com |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment