Last active
January 1, 2016 18:29
-
-
Save jeffpatton1971/8184361 to your computer and use it in GitHub Desktop.
Desired State Configuration for a basic web 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
Configuration BasicWebServer | |
{ | |
param | |
( | |
[string]$ComputerName | |
) | |
Node $ComputerName | |
{ | |
WindowsFeature WebServerRole | |
{ | |
# Installs the following features | |
<# | |
Web-Server | |
Web-WebServer | |
Web-Common-Http | |
Web-Default-Doc | |
Web-Dir-Browsing | |
Web-Http-Errors | |
Web-Static-Content | |
Web-Health | |
Web-Http-Logging | |
Web-Performance | |
Web-Stat-Compression | |
Web-Security | |
Web-Filtering | |
#> | |
Name = "Web-Server" | |
Ensure = "Present" | |
Source = "C:\Windows\SxS" | |
} | |
WindowsFeature WebAppDev | |
{ | |
Name = "Web-App-Dev" | |
Ensure = "Present" | |
Source = "C:\Windows\SxS" | |
} | |
WindowsFeature WebAspNet | |
{ | |
Name = "Web-Asp-Net" | |
Ensure = "Present" | |
Source = "C:\Windows\SxS" | |
} | |
WindowsFeature WebNetExt | |
{ | |
Name = "Web-Net-Ext" | |
Ensure = "Present" | |
Source = "C:\Windows\SxS" | |
} | |
WindowsFeature WebISAPIExt | |
{ | |
Name = "Web-ISAPI-Ext" | |
Ensure = "Present" | |
Source = "C:\Windows\SxS" | |
} | |
WindowsFeature WebISAPIFilter | |
{ | |
Name = "Web-ISAPI-Filter" | |
Ensure = "Present" | |
Source = "C:\Windows\SxS" | |
} | |
WindowsFeature WebLogLibraries | |
{ | |
Name = "Web-Log-Libraries" | |
Ensure = "Present" | |
Source = "C:\Windows\SxS" | |
} | |
WindowsFeature WebRequestMonitor | |
{ | |
Name = "Web-Request-Monitor" | |
Ensure = "Present" | |
Source = "C:\Windows\SxS" | |
} | |
WindowsFeature WebMgmtTools | |
{ | |
Name = "Web-Mgmt-Tools" | |
Ensure = "Present" | |
Source = "C:\Windows\SxS" | |
} | |
WindowsFeature WebMgmtConsole | |
{ | |
Name = "Web-Mgmt-Console" | |
Ensure = "Present" | |
Source = "C:\Windows\SxS" | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
You will need to remember to Enable-PSRemoting before you run this