Created
June 17, 2015 14:00
-
-
Save jamesallen-cm/94fd5b14d0361b179636 to your computer and use it in GitHub Desktop.
This is the DSC Config file used to configure a server as a DSC Pull Client
This file contains 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 LCM_HTTPPULL | |
{ | |
param | |
( | |
[Parameter(Mandatory=$true)] | |
[string[]]$ComputerName, | |
[Parameter(Mandatory=$true)] | |
[string]$ServerURL, | |
[Parameter(Mandatory=$true)] | |
[string]$guid | |
) | |
Node $ComputerName { | |
Settings { | |
AllowModuleOverwrite = $True | |
ConfigurationMode = 'ApplyAndAutoCorrect' | |
RefreshMode = 'Pull' | |
ConfigurationID = $guid | |
RefreshFrequencyMins = 30 | |
ConfigurationModeFrequencyMins = 15 | |
} | |
ConfigurationRepositoryWeb DSCHTTP { | |
ServerURL = $ServerURL | |
AllowUnsecureConnection = $true | |
} | |
} | |
} | |
# Computer list | |
$ComputerName='WIN-UO9GH1EJ9J7' | |
# Server URL | |
$serverURL = 'http://win-c6u0aq5k17n:8080/PSDSCPullServer.svc' | |
# Create Guid for the computers | |
$guid= '3826c347-7757-4882-be97-c8343f481800' | |
# Create the Computer.Meta.Mof in folder | |
LCM_HTTPPULL -ComputerName $ComputerName -ServerURL $serverURL -Guid $guid -OutputPath c:\DSC\HTTP |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment