This article has not been completed yet. However, it may already contain helpful information and therefore it has been published at this stage.

# View all installed IIS components
Get-WindowsFeature -Name web-server | Format-List -Property *
# Installation of the necessary IIS components
Install-WindowsFeature Web-Server -IncludeManagementTools

Expected Result:

# Adding an IIS Management Module to PowerShell
Install-Module -Name 'IISAdministration'
# Display all existing websites
# Creation of a new folder
New-Item -ItemType Directory -Name 'ILOISO' -Path 'C:\'
# Change directory
cd .\ILOISO\
# Create a subfolder
mkdir HCI
# Remove the "Default Web Site"
Remove-IISSite -Name "Default Web Site" -Verbose
# Creating a new Web Site
New-IISSite -Name 'ILOISO' -PhysicalPath 'C:\ILOISO\' -BindingInformation "*:80:"
# Display all existing websites
# Checking the current Directory Browse Configuration
Get-WebConfigurationProperty -filter /system.webServer/directoryBrowse -name enabled -PSPath 'IIS:\Sites\ILOISO'
# Adjusting the current Directory Browse Configuration
Set-WebConfigurationProperty -filter /system.webServer/directoryBrowse -name enabled -value true -PSPath 'IIS:\Sites\ILOISO'
# Restarting the IIS - / Web - Service
iisreset /restart
# Downloading some Image (HCI OS)
wget -uri -OutFile "C:\ILOISO\HCI\AzureStackHCI_20348.587_en-us.iso"

Expected Result:

# Checking the current Mime-Type Configuration
Get-WebConfiguration -Filter system.webServer/staticContent/mimeMap | Where-Object { $_.fileExtension -eq '.iso' }
# Adjusting the current Mime-Type Configuration
Add-WebConfiguration -Filter system.webServer/staticContent -AtIndex 0 -Value @{fileExtension='.iso'; mimeType='application/octetstream'}

Expected Result:

Image loading inside ILO with the help of a URL:


How To Use PowerShell and IIS to Automate Websites
How to determine if Directory Browsing is turned on in IIS in the site, app, and folder level in powershell
I’m asked, for the first time, to provide a powershell query to determine if Directory Browsing is turned on in IIS. What I have found out is that Directory Browsing could be enabled not only in the
Getting Started with PowerShell
Starting, stopping, and restarting IIS Since you can run command-line programs in PowerShell, the IISReset command can be used to start, stop, and restart IIS using the /START, /STOP … - Selection from Getting Started with PowerShell [Book]
How to Run wget from PowerShell
iLO4 Virtual Drive ISO URL
Hi, Anyone has working URL Image as Virtual Drive/CDROM in iLO4′s Remote Console ? I have iLO advanced license on Proliant DL360p Gen 8. Local iso image (“Image File”) is working without problem. But when I try using iso image located at URL (http://....) it never works.
404 error when downloading .iso file on IIS
PowerShell-toolbox/IIS-ServerSettings-AddCommonMimeTypes.ps1 at master · jlouros/PowerShell-toolbox
my collection of PowerShell scripts. Contribute to jlouros/PowerShell-toolbox development by creating an account on GitHub.