#Script template
function createIISWebsite($siteName,$sitePath,$siteUrl) {
$siteName = Get-IISSite
$sitePath =
$siteUrl =
return … }
Create IIS Website
Description:
- Create new IIS http website in port 80
- If the site name already exists, update the existing using new input parameter
- Show error when some problem happens, i.e., path not found
Script name: createIISWebsite
Input:
- siteName
- sitePath
- siteUrl
Output: status of IIS website creation
Sample input:
- siteName: test local
- sitePath: “D:\Test”
- siteUrl: test.localhost
Sample output:
- if success = " successfully created, you can access it via "
- if site name already exist = " already exist, updated the site path to and you can
access it via "
if problem happen = "Error: "
o Description
- Can specify the port (not only port 80)
- Can specify site type: http or https
- Input parameter and output is up to you