Install IIS 7.5 & FTP Server from the command line or script

If you have to install IIS multiple times on multiple systems, using the GUI to do it becomes a  real chore. An easier way is to install it from a script or from the command line.

This page has more details about installing IIS 7.5 from the command line. I have added some options in the command to install the FTP Server also, see below:

CMD /C START /w PKGMGR.EXE /l:log.etw /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-HttpRedirect;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-CGI;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-URLAuthorization;IIS-RequestFiltering;IIS-IPSecurity;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-ManagementScriptingTools;IIS-ManagementService;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;IIS-LegacyScripts;IIS-LegacySnapIn;IIS-FTPServer;IIS-FTPSvc;IIS-FTPExtensibility;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;IIS-ManagementService

Running the above command in the CMD shell will install the Web Server Role on Server 2008 R2 (IIS 7.5). If you do not require all of the modules, remove the ones you don’t need from the command.

To install from a script, dump the command above into a batch file and execute it.

Enable Snipping Tool in Server 2008 R2

The Snipping Tool is installed as default in Windows 7. Unfortunately, this is not the case in Server 2008 R2. It is one of the programs that are packaged within the Desktop Experience feature – which must be installed. To install it, do the following:

1. Click Start > Run and then enter servermanager.msc in the Open dialogue box then click OK to load Server Manager:


2. In Server Manager, right-click on Features and click Add Feature:

3. In the Features section check Desktop Experience and click Next:


Note: The screenshot above shows the Desktop Experience feature greyed out as it had already been installed when the screenshot was taken.

4. Accept the defaults and then click Install to install the Desktop Experience Feature. Once finished, reboot the server. Once the server comes back online you will see the Snipping Tool present in the program menu.

You can achieve all of the above steps by running some PowerShell commands:

PS C:\Users\Admin> Import-Module ServerManager
PS C:\Users\Admin> Add-WindowsFeature Desktop-Experience

You will see the following output confirming the success of the installation and asking you to reboot the server:

WARNING: [Installation] Succeeded: [Ink and Handwriting Services] Ink Support. You must restart this server to finish
the installation process.
WARNING: [Installation] Succeeded: [Desktop Experience] Desktop Experience. You must restart this server to finish the
installation process.

Success Restart Needed Exit Code Feature Result
------- -------------- --------- --------------
True    Yes            Succes... {Ink Support, Desktop Experience}

Reboot the server immediately and once the server comes back up you can snip to your heart’ content!