Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
$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

This comment has been minimized.

Copy link
Owner Author

jeffpatton1971 commented Dec 30, 2013

This should run after you run the adddcsservice.ps1 (

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.