Skip to content

Instantly share code, notes, and snippets.

@mgreenegit
Last active August 29, 2015 14:17
Show Gist options
  • Save mgreenegit/66b175dd8194f2b69185 to your computer and use it in GitHub Desktop.
Save mgreenegit/66b175dd8194f2b69185 to your computer and use it in GitHub Desktop.
Very short script to initialize a Pull Server on WIndows Server 2012
# This is a very basic Configuration to deploy a pull server instance in a lab environment on Windows Server 2012.
Configuration PullServer {
Import-DscResource -ModuleName xPSDesiredStateConfiguration
# Load the Windows Server DSC Service feature
WindowsFeature DSCServiceFeature
{
Ensure = 'Present'
Name = 'DSC-Service'
}
# Use the DSC Resource to simplify deployment of the web service
xDSCWebService PSDSCPullServer
{
Ensure = 'Present'
EndpointName = 'PSDSCPullServer'
Port = 8080
PhysicalPath = "$env:SYSTEMDRIVE\inetpub\wwwroot\PSDSCPullServer"
CertificateThumbPrint = 'AllowUnencryptedTraffic'
ModulePath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Modules"
ConfigurationPath = "$env:PROGRAMFILES\WindowsPowerShell\DscService\Configuration"
State = 'Started'
DependsOn = '[WindowsFeature]DSCServiceFeature'
}
}
PullServer -OutputPath 'C:\PullServerConfig\'
Start-DscConfiguration -Wait -Force -Verbose -Path 'C:\PullServerConfig\'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment