Created
December 30, 2013 21:28
-
-
Save jeffpatton1971/8188439 to your computer and use it in GitHub Desktop.
I created a simple script based on this blog article http://powershell.org/wp/2013/10/03/building-a-desired-state-configuration-pull-server/
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
$SourcePath = "$($pshome)\modules\psdesiredstateconfiguration\pullserver" | |
$DestinationPath = "C:\inetpub\wwwroot\PSDSCPullServer" | |
$AppPool = "DSCAppPool" | |
New-Item C:\inetpub\wwwroot\PSDSCPullServer\bin -ItemType directory -Force | |
Copy-Item "$($SourcePath)\psdscpullserver.*" $DestinationPath | |
Copy-Item "$($SourcePath)\Global.asax" $DestinationPath | |
Copy-Item "$($SourcePath)\Microsoft.Powershell.DesiredStateConfiguration.Service.dll" "$($DestinationPath)\bin" | |
Rename-Item "$($DestinationPath)\psdscpullserver.config" "$($DestinationPath)\web.config" | |
Copy-Item "$($SourcePath)\Devices.mdb" "$($env:programfiles)\WindowsPowerShell\DscService" | |
New-WebAppPool -Name $AppPool | |
New-Website -Name "DSC-Service" -Port 8080 -PhysicalPath $DestinationPath -ApplicationPool $AppPool | |
$appcmd = "$env:windir\system32\inetsrv\appcmd.exe" | |
& $appCmd unlock config -section:access | |
& $appCmd unlock config -section:anonymousAuthentication | |
& $appCmd unlock config -section:basicAuthentication | |
& $appCmd unlock config -section:windowsAuthentication |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
This should run after you run the adddcsservice.ps1 (https://gist.github.com/jeffpatton1971/8187784)