Sitecore Installation Framework functions

version: 1.2.0

Cannot find a proper task? Check Sitecore Install Extensions
TypeNameSynopsis
Task Install-SitecoreConfiguration Invokes a Sitecore installation Starts an installation based on a JSON configuration file.
PS C:\> Install-SitecoreConfiguration -Path .\MyConfig.json

Starts an installation based on a JSON configuration file and executes only the named tasks.
PS C:\> Install-SitecoreConfiguration -Path .\MyConfig.json -Tasks Alpha,Beta,Epsilon

Starts an installation based on a JSON configuration file and executes all tasks except the named tasks.
PS C:\> Install-SitecoreConfiguration -Path .\MyConfig.json -Skip Alpha,Beta

Starts an installation based on a JSON configuration file and executes from the specified task.
PS C:\> Install-SitecoreConfiguration -Path .\MyConfig.json -From Beta

Starts an installation based on a JSON configuration file and executes from the task named `Alpha` to the task named `Beta`.
PS C:\> Install-SitecoreConfiguration -Path .\MyConfig.json -From Alpha -To Beta

Starts an installation based on a JSON configuration file, overriding the value for the `SiteName` parameter an contained in that file.
PS C:\> Install-SitecoreConfiguration -Path .\MyConfig.json -SiteName 'MySite'
Example json configuration

"Task-Name": {
	"Type": "SitecoreConfiguration",
	"Params": {
		"Path": "",
		"Tasks": "",
		"From": "",
		"To": "",
		"Skip": "",
		"WorkingDirectory": ""
	}
}
Export-WebDeployParameters Creates a parameters file for a Web Deploy Package This will output a webdeploy-parameters.json file to the working directory. The file will contain all fields with their default values. You can then add this to a configuration.
PS C:\> Export-WebDeployParameters -Package c:\webdeploy.zip -OutPath .

This will output a webdeploy-parameters.xml file to the working directory. The file will contain only the required parameters. This can be passed directly to web deploy using the `-SetParamFile` argument
PS C:\> Export-WebDeployParameters -Package c:\webdeploy.zip -OutPath . -Format xml -Required
Get-SitecoreInstallExtension Returns information on the extensions registered with the Sitecore Install Framework. Will return all tasks and config functions registered by default.
PS C:\> Get-SitecoreInstallExtension

Will return all tasks registered by default.
PS C:\> Get-SitecoreInstallExtension -Type Task

Will return all task and config functions registered by default or through the given configuration.
PS C:\> Get-SitecoreInstallExtension -Path c:\configs\example.json
Task Install-SitecoreConfiguration Invokes a Sitecore installation Starts an installation based on a JSON configuration file.
PS C:\> Install-SitecoreConfiguration -Path .\MyConfig.json

Starts an installation based on a JSON configuration file and executes only the named tasks.
PS C:\> Install-SitecoreConfiguration -Path .\MyConfig.json -Tasks Alpha,Beta,Epsilon

Starts an installation based on a JSON configuration file and executes all tasks except the named tasks.
PS C:\> Install-SitecoreConfiguration -Path .\MyConfig.json -Skip Alpha,Beta

Starts an installation based on a JSON configuration file and executes from the specified task.
PS C:\> Install-SitecoreConfiguration -Path .\MyConfig.json -From Beta

Starts an installation based on a JSON configuration file and executes from the task named `Alpha` to the task named `Beta`.
PS C:\> Install-SitecoreConfiguration -Path .\MyConfig.json -From Alpha -To Beta

Starts an installation based on a JSON configuration file, overriding the value for the `SiteName` parameter an contained in that file.
PS C:\> Install-SitecoreConfiguration -Path .\MyConfig.json -SiteName 'MySite'
Example json configuration

"Task-Name": {
	"Type": "SitecoreConfiguration",
	"Params": {
		"Path": "",
		"Tasks": "",
		"From": "",
		"To": "",
		"Skip": "",
		"WorkingDirectory": ""
	}
}
ConfigFunction Invoke-AndConfigFunction Performs an AND operation on two or more values. Returns true.
PS C:\> Invoke-AndConfigFunction -Values 1,2,3

Returns false.
PS C:\> Invoke-AndConfigFunction -Values '1',' ','2'
Config function Invoke-AndConfigFunction is registered as And
Task Invoke-AppPoolTask Task to support the creation and modification of an IIS Application Pool. This creates a new application pool with the name 'NewPool'.
PS C:\> Invoke-AppPoolTask -Name 'NewPool'

This creates a new application pool with the name 'NewPool' and sets the Recycling.PeriodicRestart.Requests value to 500.
PS C:\> $properties = @{
            Recycling = @{
                PeriodicRestart = @{
                    Requests = 500
                }
            }
        }
PS C:\> Invoke-AppPoolTask -Name 'NewPool' -Properties $properties
Example json configuration

"Task-Name": {
	"Type": "AppPool",
	"Params": {
		"Name": "",
		"Properties": ""
	}
}
Task Invoke-CommandTask Task to support the execution of an arbitrary command. Assuming nuget is available on the current PATH, this invokes nuget.exe and displays a list of the sources available in a condensed format.
PS C:\> Invoke-CommandTask -Path nuget -Arguments sources,-format,short

This invokes nuget from a specific location and displays a list of the sources available in a condensed format.
PS C:\> Invoke-CommandTask -Path c:\utilities\nuget.exe -Arguments sources,-format,short
Example json configuration

"Task-Name": {
	"Type": "Command",
	"Params": {
		"Path": "",
		"Arguments": "",
		"TaskName": ""
	}
}
ConfigFunction Invoke-ConcatConfigFunction Concatenate values within a configuration This example takes a collection of values and concatenates them together.
PS C:\> Invoke-ConcateConfigFunction 1,2,3,4
PS C:\> 1234
Config function Invoke-ConcatConfigFunction is registered as Concat
Task Invoke-CopyTask Task to support copying files to a new location. This copies all files from c:\source to c:\dest.
PS C:\> Invoke-CommandTask -Source c:\source -Destination c:\dest
Example json configuration

"Task-Name": {
	"Type": "Copy",
	"Params": {
		"Source": "",
		"Destination": ""
	}
}
Task Invoke-CreateServiceTask Creates a Windows service This registers a service called 'Example' with the executable path 'c:\my\service.exe -list 5'. The service can be started automatically.
PS C:\> Invoke-CreateServiceTask -Name Example -Path c:\my\service.exe -Arguments '-list',5 -Startup Automatic
Example json configuration

"Task-Name": {
	"Type": "CreateService",
	"Params": {
		"Name": "",
		"Path": "",
		"Arguments": "",
		"StartupType": "",
		"Description": "",
		"DisplayName": ""
	}
}
Task Invoke-DownloadFileTask Task to support the downloading of files from the Internet. This downloads the file 'SomeFile.txt' from 'www.somedomain.com' and saves it to 'C:\Temp\SomeFile.txt'
PS C:\> Invoke-DownloadFileTask -SourceUrl http://www.somedomain.com/SomeFile.txt -DestinationPath C:\Temp\SomeFile.txt
Example json configuration

"Task-Name": {
	"Type": "DownloadFile",
	"Params": {
		"SourceUri": "",
		"DestinationPath": ""
	}
}
Task Invoke-EnsurePathTask Creates paths or cleans existing paths. This clears all content from the c:\deploy folder. If the folder does not already exist, it will be created.
PS C:\> Invoke-EnsurePathTask -Clean c:\deploy

This checks if the path c:\destination exists. If it does not exist, it will be created. If it does exist, no changes will occur.
PS C:\> Invoke-CommandTask -Exists c:\destination

This cleans and creates multiple paths at the same time.
PS C:\> Invoke-CommandTask -Clean c:\logs,c:\deploy -Exists c:\destination,c:\backup
Example json configuration

"Task-Name": {
	"Type": "EnsurePath",
	"Params": {
		"Clean": "",
		"Exists": ""
	}
}
ConfigFunction Invoke-EnvironmentConfigFunction Supports referencing of environment variables in configurations This example resolves the environment system drive.
PS C:\> Invoke-EnvironmentConfigFunction SystemDrive
PS C:\> C:\
Config function Invoke-EnvironmentConfigFunction is registered as Environment
ConfigFunction Invoke-EqualConfigFunction Returns true or false based on the equality of two values. returns false.
PS C:\> Invoke-EqualConfigFunction -Operand1 1 -Operand2 2

returns true.
PS C:\> Invoke-EqualConfigFunction -Operand1 '' -Operand2 '    '
Config function Invoke-EqualConfigFunction is registered as Equal
Task Invoke-FilePermissionsTask Sets file permissions for a path Gives the current user Read and Write permissions to the path c:\examplepath.
PS C:\> $right = @{User = $env:username; FileSystemRights = 'Read','Write'}
PS C:\> Invoke-FilePermissionsTask -Path c:\examplepath -Rights $right

Gives the current user Read and Write permissions to the path c:\examplepath and all its children.
PS C:\> $right = @{User = $env:username; FileSystemRights = 'Read','Write'; InheritanceFlags = 'ContainerInherit','ObjectInherit'}
PS C:\> Invoke-FilePermissionsTask -Path c:\examplepath -Rights $right
Example json configuration

"Task-Name": {
	"Type": "FilePermissions",
	"Params": {
		"Path": "",
		"Rights": ""
	}
}
ConfigFunction Invoke-GetCertificateConfigFunction Returns the certificate for the given name or thumbprint under a certificate path. Searches the default certificate path `cert:\LocalMachine\My` for the certificate with the name `MyCert`.
PS C:\> Invoke-GetCertificateConfigFunction -Id 'MyCert'

Searches the default certificate path `cert:\LocalMachine\My` for the certificate with the thumbprint `80AE58424A64BAAF7E82764BB9BE79EE27B46A96`.
PS C:\> Invoke-GetCertificateConfigFunction -Id '80AE58424A64BAAF7E82764BB9BE79EE27B46A96'

Searches the certificate path `cert:\LocalMachine\Root` for the certificate with the name `MyRootCert`.
PS C:\> Invoke-GetCertificateConfigFunction -Id 'MyRootCert' -CertStorePath 'cert:\LocaMachine\Root`
Config function Invoke-GetCertificateConfigFunction is registered as GetCertificate
ConfigFunction Invoke-GetCertificateThumbprintConfigFunction Returns the thumbprint for the requested certificate. Searches the default certificate path `cert:\LocalMachine\My` for the certificate with the name `MyCert` and returns the thumbprint.
PS C:\> Invoke-GetCertificateConfigFunction -Id 'MyCert'

Searches the default certificate path `cert:\LocalMachine\My` for the certificate with the thumbprint `80AE58424A64BAAF7E82764BB9BE79EE27B46A96` and returns the thumbprint.
PS C:\> Invoke-GetCertificateConfigFunction -Id '80AE58424A64BAAF7E82764BB9BE79EE27B46A96'

Searches the certificate path `cert:\LocalMachine\Root` for the certificate with the name `MyRootCert` and returns the thumbprint.
PS C:\> Invoke-GetCertificateConfigFunction -Id 'MyRootCert' -CertStorePath 'cert:\LocaMachine\Root`
Config function Invoke-GetCertificateThumbprintConfigFunction is registered as GetCertificateThumbprint
Task Invoke-HostHeaderTask Adds an entry to the system hosts file. This will add a new host entry of '127.0.0.1 customhost' to the hosts file.
PS C:\> Invoke-HostHeaderTask -Hostname customhost

This will add a new host entry of '192.168.0.5 customhost' to the hosts file.
PS C:\> Invoke-HostHeaderTask -Hostname customhost -IPAddress 192.168.0.5
Example json configuration

"Task-Name": {
	"Type": "HostHeader",
	"Params": {
		"Hostname": "",
		"IPAddress": ""
	}
}
Task Invoke-HttpRequestTask Task to support making requests over the Internet. This makes a 'GET' request to the URI 'www.somedomain.com'.
PS C:\> Invoke-HttpRequestTask -Uri "http://www.somedomain.com"

This makes a 'POST' request to the URI 'www.somedomain.com' using the data in the Parameters as the payload of the request.
PS C:\> Invoke-HttpRequestTask -Uri "http://www.somedomain.com" -Action "POST" -Parameters @{ param1="data" }

This makes a 'GET' request to the URI 'www.somedomain.com' and throw an exception if the response status code is not 404.
PS C:\> Invoke-HttpRequestTask -Uri "http://www.somedomain.com" -ExpectedStatusCode 404
Example json configuration

"Task-Name": {
	"Type": "HttpRequest",
	"Params": {
		"Uri": "",
		"Action": "",
		"ContentType": "",
		"Parameters": "",
		"ExpectedStatusCode": ""
	}
}
ConfigFunction Invoke-IfConfigFunction Returns a value based on the result of a condition. Evaluates `$value` as a boolean. If `$value` is a non-empty string the value 'abc' is returned. Otherwise the value 'def' will be returned.
PS C:\> Invoke-IfConfigFunction -Condition $value -WhenTrue 'abc' -WhenFalse 'def'
Config function Invoke-IfConfigFunction is registered as If
Task Invoke-IISConfigurationTask Configures an IIS Configuration property Sets the `uploadReadAheadSize` for the `SC1` site to a value of `491520000`
PS C:\> Invoke-IISConfigurationTask -SiteName SC1 -ConfigPath 'system.webServer/serverRuntime' -Key 'uploadReadAheadSize' -Value 491520000
Example json configuration

"Task-Name": {
	"Type": "IISConfiguration",
	"Params": {
		"SiteName": "",
		"ConfigPath": "",
		"Key": "",
		"Value": ""
	}
}
Task Invoke-IoXmlTask Enables, Disables and Deletes configuration files as stated in an IOXML file Update configuration files in "sc902" as stated in sample.ioxml
Invoke-IoXmlTask -RootDirectoryPath "C:\inetpub\wwwroot\sc902" -IoXmlPath "C:\sample.ioxml"
Example json configuration

"Task-Name": {
	"Type": "IoXml",
	"Params": {
		"RootDirectoryPath": "",
		"IoXmlPath": ""
	}
}
ConfigFunction Invoke-JoinConfigFunction Joins a list of values as a single string Creates the following string: "1,2,3"
PS C:\> Invoke-JoinConfigFunction -Values @(1,2,3)

Creates the following string: "1:2:3"
PS C:\> Invoke-JoinConfigFunction -Values @(1,2,3) -Delimiter ":"
Config function Invoke-JoinConfigFunction is registered as Join
ConfigFunction Invoke-JoinPathConfigFunction Joins a list of values as a single path Returns the path 'c:\example\path'
PS C:\> Invoke-JoinPathConfigFunction c: example path

Returns the path '.\abc'
PS C:\> Invoke-JoinPathConfigFunction @('.\',$null,'abc')

Returns the path '.\test\abc'
PS C:\> $obj = [pscustomobject]@{ Value = 'test' }
PS C:\> $obj | Add-Member -Name ToString -MemberType ScriptMethod -Value { $this.Value } -Force
PS C:\> Invoke-JoinPathConfigFunction '.\',$obj,'abc'
Config function Invoke-JoinPathConfigFunction is registered as JoinPath
Task Invoke-ManageAppPoolTask Task to support the Starting, Stopping and Restarting of an application pool. Starts the application pool named DefaultAppPool.
PS C:\> Invoke-ManageAppPoolTask -Name "DefaultAppPool" -Action "Start"

Stops the application pool named DefaultAppPool.
PS C:\> Invoke-ManageAppPoolTask -Name "DefaultAppPool" -Action "Stop"

Restarts the application pool named DefaultAppPool.
PS C:\> Invoke-ManageAppPoolTask -Name "DefaultAppPool" -Action "Restart"
Example json configuration

"Task-Name": {
	"Type": "ManageAppPool",
	"Params": {
		"Name": "",
		"Action": ""
	}
}
Task Invoke-ManageServiceTask Manages changes to an existing service. Updates the existing service 'Example', setting its status to running and changing its startup type to automatic.
PS C:\> Invoke-ManageServiceTask -Name Example -Status Running -StartupType Automatic
Example json configuration

"Task-Name": {
	"Type": "ManageService",
	"Params": {
		"Name": "",
		"Status": "",
		"StartupType": "",
		"Description": "",
		"DisplayName": "",
		"PostDelay": ""
	}
}
Task Invoke-ManageSolrConfigTask Manages changes to the configuration of a core on an existing Solr instance. Adds a new request handler called 'new_query' to 'core0' on the Solr instance at 'http://localhost:8983:/solr'.
PS C:\> Invoke-ManageSolrConfigTask -Address "http://localhost:8983:/solr" -CoreName "core0" -Config @{
	'add-requesthandler' = @{
		name = "/new_query"
		class = "solr.SearchHandler"
		defaults = @{
			echoParams = "explicit"
			wt = "json"
			indent = true
		}
	}
}
Example json configuration

"Task-Name": {
	"Type": "ManageSolrConfig",
	"Params": {
		"Address": "",
		"CoreName": "",
		"Config": "",
		"RetryCount": "",
		"RetryDelay": "",
		"RequestTimeout": ""
	}
}
Task Invoke-ManageSolrCoreTask Manages changes to the cores of an existing Solr instance. Creates a new core called 'core0' on the Solr instance at 'http://localhost:8983:/solr'.
PS C:\> Invoke-ManageSolrCoreTask -Action "Create" -Address "http://localhost:8983:/solr" -Arguments @{ Name = "core0" }

Removes an existing core called 'core0' on the Solr instance at 'http://localhost:8983:/solr'.
PS C:\> Invoke-ManageSolrCoreTask -Action "Unload" -Address "http://localhost:8983:/solr" -Arguments @{ Core = "core0" }
Example json configuration

"Task-Name": {
	"Type": "ManageSolrCore",
	"Params": {
		"Action": "",
		"Address": "",
		"Arguments": "",
		"RetryCount": "",
		"RetryDelay": "",
		"RequestTimeout": ""
	}
}
Task Invoke-ManageSolrSchemaTask Manages changes to the schema of an existing Solr core. Replaces the dynamic field `*_s` with new properties
PS C:\> Invoke-ManageSolrSchemaTask -Address "http://localhost:8983:/solr" -Core sitecore_master_index -Arguments @{ 
    'replace-dynamic-field' = @(
        @{
            name: '*_s',
            type: 'lowercase',
            stored: $false,
            indexed: $true
        }
    )
}

Invokes the command using with arguments sources from the file `c:\schema.json`
PS C:\> Invoke-ManageSolrSchemaTask -Address "http://localhost:8983:/solr" -Core sitecore_master_index -ArgumentsFile c:\schema.json
Example json configuration

"Task-Name": {
	"Type": "ManageSolrSchema",
	"Params": {
		"Address": "",
		"Arguments": "",
		"Core": "",
		"RequestTimeout": "",
		"RetryCount": "",
		"RetryDelay": "",
		"Address": "",
		"ArgumentsFile": "",
		"Core": "",
		"RequestTimeout": "",
		"RetryCount": "",
		"RetryDelay": ""
	}
}
Task Invoke-ManageWebsiteTask Task to support the starting and stopping of an IIS web site. Starts the site named 'Default Web Site'.
PS C:\> Invoke-ManageWebsiteTask -Name "Default Web Site" -Action "Start"

Stops the site named 'Default Web Site'.
PS C:\> Invoke-ManageWebsiteTask -Name "Default Web Site" -Action "Stop"

Restarts the site named 'Default Web Site'.
PS C:\> Invoke-ManageWebsiteTask -Name "Default Web Site" -Action "Restart"
Example json configuration

"Task-Name": {
	"Type": "ManageWebsite",
	"Params": {
		"Name": "",
		"Action": ""
	}
}
ConfigFunction Invoke-NotConfigFunction Returns the logical opposite of the given value. Returns false.
PS C:\> Invoke-NotConfigFunction -Value 1

Returns true.
PS C:\> Invoke-NotConfigFunction -Value ''
Config function Invoke-NotConfigFunction is registered as Not
ConfigFunction Invoke-OrConfigFunction Performs an OR operation on two or more values. Returns true.
PS C:\> Invoke-OrConfigFunction -Values 1,2,3

Returns true.
PS C:\> Invoke-OrConfigFunction -Values '1',' ','2'

Returns false.
PS C:\> Invoke-OrConfigFunction -Values 0,' ',0
Config function Invoke-OrConfigFunction is registered as Or
ConfigFunction Invoke-ReadJsonConfigFunction Reads the contents of a json file. Reads the content of the configuration.json file and returns an object that represents the data in the file.
PS C:\> Invoke-ReadJsonConfigFunction -Path .\configuration.json
Config function Invoke-ReadJsonConfigFunction is registered as ReadJson
Task Invoke-RemoveServiceTask Removes a service from the machine. Removes the 'Example' service.
PS C:\> Invoke-RemoveServiceTask -Name Example
Example json configuration

"Task-Name": {
	"Type": "RemoveService",
	"Params": {
		"Name": ""
	}
}
ConfigFunction Invoke-ResolveCertificatePathConfigFunction Supports resolving file system paths from Certificate store paths in configurations. This example resolves the file system directory of the specified Certificate store path.
PS C:\> Invoke-ResolveCertificatePathConfigFunction -CertificatePath Cert:\LocalMachine\My\0000000000000000000000000000000000000000
Config function Invoke-ResolveCertificatePathConfigFunction is registered as ResolveCertificatePath
ConfigFunction Invoke-ResolvePathConfigFunction Supports resolving file system paths in configurations. This example resolves the parent directory of the current directory and returns the full directory path.
PS C:\> Invoke-ResolvePathConfigFunction -Path ..
Config function Invoke-ResolvePathConfigFunction is registered as ResolvePath
Task Invoke-SetXmlTask Sets values in an XML document. Sets the value of //root/config in the file to be 'test'.
PS C:\> Invoke-SetXmlTask -FilePath c:\example.xml -XPath //root/config -Value test

Adds or updates the //root/config element with an attribute called 'extra' and a value of 'test'.
PS C:\> Invoke-SetXmlTask -FilePath c:\example.xml -XPath //root/config -Attributes @{ extra = 'test' }

Adds a new element at //root/config/text with a value of 'test2' and an 'extra' attribute with a value of 'test3'.
PS C:\> Invoke-SetXmlTask -FilePath c:\example.xml -XPath //root/config -Element test -value test2 -Attributes @{ extra = 'test3' }
Example json configuration

"Task-Name": {
	"Type": "SetXml",
	"Params": {
		"Attributes": "",
		"Element": "",
		"FilePath": "",
		"Value": "",
		"XPath": ""
	}
}
Task Invoke-SitecoreUrlTask Makes a request to s specific Sitecore Url. Logs in to the Sitecore instance at http://localhost and then requests the /sitecore/amdin/showconfig.aspx page.
PS C:\> Invoke-SitecoreUrlTask -SitecoreInstanceRoot "http://localhost" -SitecoreActionPath "sitecore/admin/showconfig.aspx" -Username "admin" -Password "pass"
Example json configuration

"Task-Name": {
	"Type": "SitecoreUrl",
	"Params": {
		"SitecoreInstanceRoot": "",
		"SitecoreActionPath": "",
		"Username": "",
		"Password": ""
	}
}
ConfigFunction Invoke-SqlConnectionStringConfigFunction Creates a Sql connection string Returns the connection string: 'Data Source=.\Sql2016;Initial Catalog=sitecore_core'
PS C:\> Invoke-SqlConnectionStringConfigFunction '.\SQL2016' 'sitecore_core'

Returns the connection string: 'Data Source=.\Sql2016;Initial Catalog=sitecore_core;User ID=sa;Password=12345'
PS C:\> Invoke-SqlConnectionStringConfigFunction '.\SQL2016' 'sitecore_core' 'sa' '12345
Config function Invoke-SqlConnectionStringConfigFunction is registered as SqlConnectionString
Task Invoke-TransformXmlDocTask Transforms xml files by providing XML Document Transform files This transforms xml files inside root directory by looking at the relative paths of the xml tranformation documents in xdt directory
Invoke-TransformXmlDocTask -RootDirectoryPath "C:\inetpub\wwwroot\sc902" -XdtDirectory "C:\Transforms\MyTransform"
Example json configuration

"Task-Name": {
	"Type": "TransformXmlDoc",
	"Params": {
		"RootDirectoryPath": "",
		"XdtDirectory": ""
	}
}
Task Invoke-UnpackTask Extracts an archive file to disk. Extracts the contents of 'content.zip' to the destination 'c:\unpacked'.
PS C:\> Invoke-UnpackTask -Source content.zip -Destination c:\unpacked
Example json configuration

"Task-Name": {
	"Type": "Unpack",
	"Params": {
		"Source": "",
		"Destination": ""
	}
}
Task Invoke-WebBindingTask Creates, updates, and removes web bindings. Adds a new web binding to a site. In this example, the binding matches the default '*:80:' binding.
PS C:\> Invoke-WebBindingTask -SiteName ExampleSite -Add @{ Port = 80 }

Adds a new https binding to a site. In this example, the binding matches the default '*:443:' binding with a certificate.
PS C:\> Invoke-WebBindingTask -SiteName ExampleSite -Add @{ Port = 443; Protocol = 'https'; Thumbprint = '97A875E0F559AB380C1FDBEF3CB391E5C7ED87BA' }

Adds a binding for the localhost address restricted to the hostheader 'Example'.
PS C:\> Invoke-WebBindingTask -SiteName ExampleSite -Add @{ HostHeader = 'Example'; IPAddress = '127.0.0.1' }

Removes all existing bindings before adding a default https binding. The binding is set to '*:443:'.
PS C:\> Invoke-WebBindingTask -SiteName ExampleSite -Remove * -Add @{ Protocol = 'https' }

Removes all existing bindings that use the 'http' protocol.
PS C:\> Invoke-WebBindingTask -SiteName ExampleSite -Remove @{ Protocol = 'http' }

Updates existing bindings using port 80 with an empty hostheader and no assigned IP to use port 81.
PS C:\> Invoke-WebBindingTask -SiteName ExampleSite -Update @{ Port = 80; PropertyName = 'Port'; Value = 81 }

Updates existing binding on port 443 to use the certificate with thumbprint '97A875E0F559AB380C1FDBEF3CB391E5C7ED87BA'.
PS C:\> Invoke-WebBindingTask -SiteName ExampleSite -Update @{ Port = 443; Thumbprint = '97A875E0F559AB380C1FDBEF3CB391E5C7ED87BA' }
Example json configuration

"Task-Name": {
	"Type": "WebBinding",
	"Params": {
		"SiteName": "",
		"Add": "",
		"Remove": "",
		"Update": ""
	}
}
Task Invoke-WebDeployTask Executes a Web Deploy command. This invokes msdeploy from the default path in the following way: c:\\msdeploy.exe -verb:Sync -source:setAcl -dest:setAcl='SiteName',setAclAccess-'FullControl'
PS C:\> $deployArgs = @{
	Source = 'setAcl'
		Dest = @{
			setAcl = 'SiteName'
			setAclAccess = 'FullControl'
		}
	}
PS C:\> Invoke-WebDeployTask -Verb Sync -Arguments $deployArgs
Example json configuration

"Task-Name": {
	"Type": "WebDeploy",
	"Params": {
		"Verb": "",
		"Path": "",
		"Arguments": ""
	}
}
Task Invoke-WebRequestTask Requests a web page, with optional retries Requests the localhost site
PS C:\> Invoke-WebRequestTask -Uri http://localhost

Requests the localhost site. If the site does not return successfully within three attempts an error is thrown.
PS C:\> Invoke-WebRequestTask -Uri http://localhost -RetryCount 3
Example json configuration

"Task-Name": {
	"Type": "WebRequest",
	"Params": {
		"Uri": "",
		"RetryCount": "",
		"RetryDelay": "",
		"RequestTimeout": ""
	}
}
Task Invoke-WebsiteClientCertTask Configures client certificate settings for a website. Configures the website `XConnect` to ignore client certificates.
PS C:\> Invoke-WebsiteClientCertTask -SiteName XConnect -Setting Ignore

Configures the website `XConnect` to accept client certificates and require SSl.
PS C:\> Invoke-WebsiteClientCertTask -SiteName XConnect -Setting Accept -Ssl

Configures the website `XConnect` to require client certificates. When `Require` is chosen for the setting, SSL is also required.
PS C:\> Invoke-WebsiteClientCertTask -SiteName XConnect -Setting Require
Example json configuration

"Task-Name": {
	"Type": "WebsiteClientCert",
	"Params": {
		"SiteName": "",
		"Setting": "",
		"Ssl": ""
	}
}
Task Invoke-WebSiteTask Task to support the creation and modification of an IIS website. This creates a new website named 'NewSite' using the 'NewPool' application pool. The site's physical path is set to c:\inetpub\newsite.
PS C:\> Invoke-WebsiteTask -Name 'NewSite' -ApplicationPool 'NewPool' -PhysicalPath c:\inetpub\newsite

This creates a new website named 'NewSite' using the 'NewPool' application pool. The site's physical path is set to c:\inetpub\newsite. The site will have a binding with the hostname 'Test'.
PS C:\> Invoke-WebsiteTask -Name 'NewSite' -ApplicationPool 'NewPool' -PhysicalPath c:\inetpub\newsite -Hostname 'Test'

This creates a new website named 'NewSite' using the 'NewPool' application pool. The site's physical path is set to c:\inetpub\newsite. The site will have a binding with the port set to 8080.
PS C:\> Invoke-WebsiteTask -Name 'NewSite' -ApplicationPool 'NewPool' -PhysicalPath c:\inetpub\newsite -Port 8080

This creates a new website named 'NewSite' using the 'NewPool' application pool. The site's physical path is set to c:\inetpub\newsite. The site will have a binding with the IP address set to '127.0.0.1'.
PS C:\> Invoke-WebsiteTask -Name 'NewSite' -ApplicationPool 'NewPool' -PhysicalPath c:\inetpub\newsite -IPAddress '127.0.0.1'

This creates the new website and also sets its Limits.ConnectionTimeout property to 1 minute.
PS C:\> $properties = @{
            Limits = @{
                ConnectionTimeout = '00:01:00'
            }
        }
PS C:\> Invoke-WebsiteTask -Name 'NewSite' -ApplicationPool 'NewPool' -PhysicalPath c:\inetpub\newsite -Properties $properties
Example json configuration

"Task-Name": {
	"Type": "WebSite",
	"Params": {
		"Name": "",
		"ApplicationPool": "",
		"PhysicalPath": "",
		"Hostname": "",
		"Port": "",
		"IPAddress": "",
		"Properties": ""
	}
}
Register-SitecoreInstallExtension Registers extensions to use in Sitecore Install Framework configurations. Registers the `Write-Host` command as a `Task` called `Write`
PS C:\> Register-SitecoreInstallExtension -Command Write-Host -As Write -Type Task

Registers the `Copy-Item` command as a `Task` called `Copy`. The use of `Force` will ensure any registered task called `Copy` will be overwritten.
PS C:\> Register-SitecoreInstallExtension -Command Copy-Item -As Copy -Type Task -Force
Write-TaskHeader Outputs a formatted message to the information stream. This outputs a message in the format '[----- SomeTask : CustomType -----]'. The message will fill the width of the host buffer with extra dashes.
PS C:\> Write-TaskHeader -TaskName 'SomeTask' -TaskType 'CustomType'
Write-TaskInfo Writes a message to the host and information stream. If this example is called within a function called 'Invoke-MyFunctionTask', the output is: '[MyFunction]:[Context] log this' If the example is called from some other function, the output would is: '[Context] log this'
PS C:\> Write-TaskInfo -Message 'log this' -Tag 'Context'

This call outputs: '[CustomTask]:[Context] log this'
PS C:\> Write-TaskInfo -Message 'log this' -Tag 'Context' -TaskName 'CustomTask'