Skip to content

Instantly share code, notes, and snippets.

@itpropro
Created March 30, 2016 02:28
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save itpropro/7a24df5c2ec3d1aaa64ff21fd2500c17 to your computer and use it in GitHub Desktop.
Save itpropro/7a24df5c2ec3d1aaa64ff21fd2500c17 to your computer and use it in GitHub Desktop.
[DscLocalConfigurationManager()]
Configuration PullClientV2 {
param(
[Parameter(Mandatory=$True)]
[String]$ConfigurationNames,
[Parameter(Mandatory=$True)]
[String]$Server
)
Settings
{
AllowModuleOverwrite = $true;
RefreshMode = 'PULL';
RebootNodeIfNeeded = $true;
RefreshFrequencyMins = 30;
ConfigurationModeFrequencyMins = 15;
ConfigurationMode = 'ApplyAndAutoCorrect';
ActionAfterReboot = 'ContinueConfiguration'
CertificateID = '1234561234561234561234561234561234561234' # Change thumbprint
}
ConfigurationRepositoryWeb PPS001
{
ServerUrl = 'https://' + $Server + ':443/PSDSCPullServer.svc'
RegistrationKey = 'c5effe3b-133d-483e-801f-69d33af75659' # Change at will (new-guid)
ConfigurationNames = @($ConfigurationNames)
}
}
PullClientV2 -Server $PullServer -ConfigurationNames $ConfigurationID # Change on demand
$FilePath = (Get-Location -PSProvider FileSystem).Path + '\PullClientV2'
Set-DscLocalConfigurationManager -ComputerName 'Localhost' -Path $FilePath
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment