Skip to content

Instantly share code, notes, and snippets.

@vhusker
Created March 10, 2015 12:33
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 vhusker/d9c6b58174c242dafa22 to your computer and use it in GitHub Desktop.
Save vhusker/d9c6b58174c242dafa22 to your computer and use it in GitHub Desktop.
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