Skip to content

Instantly share code, notes, and snippets.

@duffney
Created August 27, 2015 20:42
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 duffney/a41aa64efac5b2c36355 to your computer and use it in GitHub Desktop.
Save duffney/a41aa64efac5b2c36355 to your computer and use it in GitHub Desktop.
LCM_HTTPPULL.ps1
[DSCLocalConfigurationManager()]
Configuration LCM_HTTPPULL
{
param
(
[Parameter(Mandatory=$true)]
[string[]]$ComputerName,
[Parameter(Mandatory=$true)]
[string]$guid
)
Node $ComputerName {
Settings{
AllowModuleOverwrite = $True
ConfigurationMode = 'ApplyAndAutoCorrect'
RefreshMode = 'Pull'
ConfigurationID = $guid
}
ConfigurationRepositoryWeb DSCHTTP {
#ConfigurationNames = 'DSCHTTP'
ServerURL = 'http://ws2016p3.domain.org:8080/PSDSCPullServer.svc/'
AllowUnsecureConnection = $true
}
}
}
# Computer list
$ComputerName='DC02', 'DC03'
# Create Guid for the computers
$guid=[guid]::NewGuid()
# Create the Computer.Meta.Mof in folder
LCM_HTTPPULL -ComputerName $ComputerName -Guid $guid -OutputPath c:\DSC\HTTP
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment