Advertisement
Dennisaa

Install-IIS

Mar 8th, 2014
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <#
  2. .Synopsis
  3.    Install IIS and Windows required features, for 1 or more computers.
  4.    Requires PS3
  5.    Requires Windows 2008 R2 or higher
  6. .Description
  7.    To see the current list of installed features, use [Get-WindowsFeature]
  8.    The system must be rebooted after installation
  9. .Example
  10.    Install-IIS
  11. #>
  12. function Install-IIS
  13. {
  14.  
  15.     Param (
  16.         [Parameter(Mandatory=$true, Position=0)]
  17.         [string[]]
  18.         $ComputerSet
  19.     )
  20.  
  21.     Begin
  22.     {
  23.         Import-Module ServerManager
  24.     }
  25.     Process
  26.     {
  27.  
  28.         Add-WindowsFeature Application-Server, NPAS, Web-Server, Net-Framework, RDS-RD-Server -IncludeAllSubFeature -Restart -Concurrent
  29.  
  30.     }
  31. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement