Skip to content

Instantly share code, notes, and snippets.

@opentable-devops
Created June 28, 2013 18:20
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save opentable-devops/5886831 to your computer and use it in GitHub Desktop.
Save opentable-devops/5886831 to your computer and use it in GitHub Desktop.
function enable_net_3_5_features()
{
Add-WindowsFeature NET-HTTP-Activation
Add-WindowsFeature NET-Win-CFAC
Add-WindowsFeature NET-Non-HTTP-Activ
Add-WindowsFeature AS-MSMQ-Activation
}
function enable_iis_common_http_features()
{
Add-WindowsFeature Web-Static-Content
Add-WindowsFeature Web-Http-Errors
Add-WindowsFeature Web-Default-Doc
}
function enable_iis_application_development_features()
{
Add-WindowsFeature Web-Asp-Net
Add-WindowsFeature Web-Net-Ext
Add-WindowsFeature Web-ISAPI-Ext
Add-WindowsFeature Web-ISAPI-Filter
}
function enable_iis_health_and_diagnostics_features()
{
Add-WindowsFeature Web-Http-Logging
Add-WindowsFeature Web-Request-Monitor
}
function enable_iis_security_features()
{
Add-WindowsFeature Web-Filtering
}
function enable_iis_performance_features()
{
Add-WindowsFeature Web-Stat-Compression
Add-WindowsFeature Web-Dyn-Compression
}
function enable_iis_management_tools()
{
Add-WindowsFeature Web-Mgmt-Tools
Add-WindowsFeature Web-Mgmt-Console
}
Import-Module ServerManager
$osCaption = (Get-WmiObject Win32_OperatingSystem).Caption
$osArchitecture = (Get-WmiObject Win32_OperatingSystem).OSArchitecture
Write-Host('Server found is {0}{1}' -f $osCaption, $osArchitecture)
Write-Host ("Enable Microsoft .Net Framework 3.5 features")
enable_net_3_5_features
Write-Host('Enabling Common HTTP Features (IIS)')
enable_iis_common_http_features
Write-Host ("Enabling Application Development Features (IIS)")
enable_iis_application_development_features
Write-Host('Enabling Health and Diagnostics Features (IIS)')
enable_iis_health_and_diagnostics_features
Write-Host('Enabling Security Features (IIS)')
enable_iis_security_features
Write-Host('Enabling Performance Features (IIS)')
enable_iis_performance_features
Write-Host('Enabling Management Tools (IIS)')
enable_iis_management_tools
Write-Host('Application Server Setup complete')
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment