Create a gist now

Instantly share code, notes, and snippets.

What would you like to do?
Set App Server Local Configuration
Configuration PushLCMConfig{
param(
[parameter(Mandatory=$True)]
[ValidateNotNullorEmpty()]
[string]$ComputerName
)
Node $ComputerName{
LocalConfigurationManager{
ConfigurationMode = 'ApplyAndAutoCorrect'
ConfigurationID = "78653f12-9e40-41fd-9b92-a9c14e3670a7"
RefreshMode = 'Pull'
DownloadManagerName = 'WebDownloadManager'
DownloadManagerCustomData = @{
#Make sure to change the ServerURL to match what you are using
ServerUrl = 'http://$PULLSERVER.DOMAIN.COM:8080/PSDSCPullServer.svc';
AllowUnsecureConnection = 'true' }
RebootNodeIfNeeded = $True
}
}
}
PushLCMConfig -ComputerName $YourComputerName -OutputPath $YourPath
Set-DscLocalConfigurationManager -ComputerName $YourComputerName -Path $YourPath -Verbose
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment