Created
March 6, 2017 13:16
-
-
Save duffney/4bf617655382d8e6fe7dc7a18b67c62c to your computer and use it in GitHub Desktop.
Simple Web Server DSC Configuration for a DSC 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 WebServer { | |
Import-DscResource -ModuleName 'PSDesiredStateConfiguration' | |
Import-DscResource -ModuleName "xWebAdministration" | |
Node WebServerConfig { | |
WindowsFeature WindowsServer { | |
Name = 'Web-Server' | |
} | |
File GlobomanticsPath { | |
DestinationPath = $env:SystemDrive+'\Globomantics' | |
Type = 'Directory' | |
Ensure = 'Present' | |
} | |
xWebVirtualDirectory Globomantics { | |
Name = 'Globomantics' | |
PhysicalPath = $env:SystemDrive+'\Globomantics' | |
WebApplication = '' | |
Website = 'Default Web Site' | |
Ensure = 'Present' | |
DependsOn = '[File]GlobomanticsPath' | |
} | |
} | |
} | |
WebServer -OutputPath $env:SystemDrive'\dsc\WebServer' | |
new-dscchecksum -path $env:SystemDrive'\dsc\WebServer\WebServerConfig.mof' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment