Skip to content

Instantly share code, notes, and snippets.

@duffney
Created August 27, 2015 01:06
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/97c764e17373b82635cc to your computer and use it in GitHub Desktop.
Save duffney/97c764e17373b82635cc to your computer and use it in GitHub Desktop.
Config_HTTPPullServer.ps1
configuration HTTPPullServer
{
# Modules must exist on target pull server
Import-DSCResource -ModuleName xPSDesiredStateConfiguration
Node WS2016P3
{
WindowsFeature DSCServiceFeature
{
Ensure = "Present"
Name = "DSC-Service"
}
WindowsFeature IISConsole {
Ensure = "Present"
Name = "Web-Mgmt-Console"
}
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"
}
xDscWebService PSDSCComplianceServer
{
Ensure = "Present"
EndpointName = "PSDSCComplianceServer"
Port = 9080
PhysicalPath = "$env:SystemDrive\inetpub\wwwroot\PSDSCComplianceServer"
CertificateThumbPrint = "AllowUnencryptedTraffic"
State = "Started"
IsComplianceServer = $true
DependsOn = ("[WindowsFeature]DSCServiceFeature","[xDSCWebService]PSDSCPullServer")
}
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment