Skip to main content

Install Windows IIS

This article applies to: Managed Servers

Installing IIS

  1. On the Start menu, select All Programs, and then select Administrative Tools.
    You can also right-click Computer, and then select Manage.
  2. Click Server Manager, and then click Roles.

  3. Click Add Roles.

  4. On the Before You Begin screen, click Next.

  5. Select Web Server (IIS), and then click Next.
    Depending on your set up, you may see a box asking if you want to Add features required for Web Server (IIS). Click Add Required Features.

  6. On the Select Role Services screen, either accept the defaults or make other selections if required based on your vendor's documentation.

  7. Click Next.
  8. Click Install.
    When the installation is finished, the new role service is available in the Server Manager.

Note: To add or remove additional settings within IIS, click Add Role Services or Remove Role Services.

Set Location to Store Log Files

IIS creates log files. You should set a location on the e:/ drive to store the log files.

The step-by-step information about how to set this location is available on the Microsoft site here:

Purge Log Files

Best practice: Periodically purge log files.

Note: The following script is provided as a sample. The Systems Support group does not offer support for this script. Be sure you understand its function before implementing it.

#------ Script File---- Put into a file called "purger.ps1"
param ($source_folder, $days_to_delete)
function purge-folder ($sourcedir, [int]$days) {

if (-not (test-path $sourcedir)) {

write-output "Path does not exist"



$lastwrite = (get-date).AddDays(-$days)

Foreach ($file in (gci $sourcedir -recurse | where {$_.lastwritetime -le $lastwrite})) {

write-output "Deleting $($file.fullname)"

remove-item $file.fullname



purge-folder $source_folder $days_to_delete

#------ End Script File

  1. Create a new text file with the script information, called "purger.ps1". Copy the purger.ps1 file to the system you will be using.
  2. Run it with the following parameters:
    • Source_folder - The full path of the folder to purge. Put folder path with spaces in quotes
    • days_to_delete - The number of days a file has to be old before it will be deleted. (Anything older than the current date/time - (24 hours * days_to_delete) will be deleted)

Ex: .\purger.ps1 c:\windows\system32\logfiles\ 30

Was this page helpful?

Your feedback helps improve the site.