Created
June 17, 2015 14:01
-
-
Save jamesallen-cm/ea07d70dfc4a0bdd4a81 to your computer and use it in GitHub Desktop.
This is the DSC Config file used to configure a server as a DSC http Pull Server
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
configuration HTTPPullServer | |
{ | |
param | |
( | |
[Parameter(Mandatory=$true)] | |
[string[]]$ComputerName | |
) | |
# Modules must exist on target pull server | |
Import-DscResource -ModuleName xPSDesiredStateConfiguration | |
Node $ComputerName | |
{ | |
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") | |
} | |
} | |
} | |
# Computer list | |
$ComputerName='WIN-C6U0AQ5K17N' | |
# Generate MOF | |
HTTPPullServer -ComputerName $ComputerName -OutputPath C:\DSC\HTTP | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment