-
-
Save ekmixon/9f3eb8007fb1977fe7ddd05b93690d74 to your computer and use it in GitHub Desktop.
CreatePullsServer.ps1
This file contains hidden or 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
# Step 1 Install xPSDesiredStateConfiguration | |
Install-Module -Name xPSDesiredStateConfiguration | |
# Step 2 | |
# Create the Pull Server. | |
Configuration CreatePullServer { | |
param ( | |
[string[]]$ComputerName = 'localhost' | |
) | |
Import-DSCResource -ModuleName xPSDesiredStateConfiguration | |
Import-DSCResource –ModuleName PSDesiredStateConfiguration | |
Node $ComputerName { | |
WindowsFeature DSCServiceFeature { | |
Ensure = "Present" | |
Name = "DSC-Service" | |
} | |
xDscWebService PSDSCPullServer { | |
Ensure = "Present" | |
UseSecurityBestPractices = 0 | |
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" | |
} | |
} | |
} | |
#Creates the .mof file | |
CreatePullServer | |
# Apply the Pull Server configuration to the Pull Server | |
Start-DscConfiguration .\CreatePullServer -Wait |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment