Pipelines/Steps/Install/OnPrem/Sitecore/XP/AllInOne/9.1/0/sitecore-XP0.json

{
    "Parameters": {
        "Package": {
            "Type": "string",
            "Description": "The path to the Web Deploy package to deploy.",
            "DefaultValue": ""
        },
        "LicenseFile": {
            "Type": "string",
            "Description": "The path to the Sitecore license file.",
            "DefaultValue" : ".\\License.xml"
        },
        "SqlDbPrefix": {
            "Type": "string",
            "Description": "The prefix used for all Sql databases.",
            "DefaultValue" : ""
        },
        "SolrCorePrefix": {
            "Type": "string",
            "Description": "The prefix used for all Solr cores.",
            "DefaultValue" : ""
        },
        "XConnectCert": {
            "Type": "string",
            "Description": "The certificate to use for encryption. Provide the name or the thumbprint.",
            "DefaultValue" : ""
        },
        "SiteName": {
            "Type": "string",
            "DefaultValue": "Sitecore",
            "Description": "The name of the site to be deployed."
        },
        "SitecoreAdminPassword": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "The admin password for the Sitecore instance."
        },
        "SqlAdminUser": {
            "Type": "string",
            "DefaultValue": "sa",
            "Description": "The Sql admin user account to use when installing databases."
        },
        "SqlAdminPassword": {
            "Type": "string",
            "DefaultValue": "12345",
            "Description": "The Sql admin password to use when installing databases."
        },
        "SqlCoreUser": {
            "Type": "string",
            "DefaultValue": "coreuser",
            "Description": "The user to create and use in Core connection string."
        },
        "SqlCorePassword": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "The Sql password for the Core connection string in Sitecore."
        },
        "SqlSecurityUser": {
            "Type": "string",
            "DefaultValue": "securityuser",
            "Description": "The user to create and use in Security connection string."
        },
        "SqlSecurityPassword": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "The Sql password for the Security connection string in Sitecore."
        },
        "SqlMasterUser": {
            "Type": "string",
            "DefaultValue": "masteruser",
            "Description": "The user to create and use in Master connection string."
        },
        "SqlMasterPassword": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "The Sql password for the Master connection string in Sitecore."
        },
        "SqlWebUser": {
            "Type": "string",
            "DefaultValue": "webuser",
            "Description": "The user to create and use in Web connection string."
        },
        "SqlWebPassword": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "The Sql password for the Web connection string in Sitecore."
        },
        "SqlReportingUser": {
            "Type": "string",
            "DefaultValue": "reportinguser",
            "Description": "The user to create and use in Reporting connection string."
        },
        "SqlReportingPassword": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "The Sql password for the Reporting connection string in Sitecore."
        },
        "SqlProcessingPoolsUser": {
            "Type": "string",
            "DefaultValue": "poolsuser",
            "Description": "The user to create and use in Processing Pools connection string."
        },
        "SqlProcessingPoolsPassword": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "The Sql password for the Processing Pools connection string in Sitecore. This must be the same as set in the xconnect "
        },
        "SqlProcessingTasksUser": {
            "Type": "string",
            "DefaultValue": "tasksuser",
            "Description": "The user to create and use in Processing Tasks connection string."
        },
        "SqlProcessingTasksPassword": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "The Sql password for the Processing Tasks connection string in Sitecore."
        },
        "SqlReferenceDataUser": {
            "Type": "string",
            "DefaultValue": "referencedatauser",
            "Description": "The user to create and use in Reference Data connection string."
        },
        "SqlReferenceDataPassword": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "The Sql password for the Reference Data connection string in Sitecore."
        },
        "SqlMarketingAutomationUser": {
            "Type": "string",
            "DefaultValue": "marketingautomationuser",
            "Description": "The user to create and use in Marketing Automation connection string."
        },
        "SqlMarketingAutomationPassword": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "The Sql password for the Marketing Automation connection string in Sitecore."
        },
        "SqlFormsUser": {
            "Type": "string",
            "DefaultValue": "formsuser",
            "Description": "The user to create and use in Experience Forms connection string."
        },
        "SqlFormsPassword": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "The Sql password for the Experience Forms connection string in Sitecore."
        },
        "SqlExmMasterUser": {
            "Type": "string",
            "DefaultValue": "exmmasteruser",
            "Description": "The Sql user for the EXM Master connection string in Sitecore."
        },
        "SqlExmMasterPassword": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "The Sql password for the EXM Master connection string in Sitecore."
        },
        "SqlMessagingUser": {
          "Type": "string",
          "DefaultValue": "messaginguser",
          "Description": "The Sql user for the Messaging connection string in Sitecore."
        },
        "SqlMessagingPassword": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "The Sql password for the Messaging connection string in Sitecore."
        },
        "SqlServer": {
            "Type": "string",
            "DefaultValue": ".\\SQLSERVER",
            "Description": "The Sql Server where databases will be installed."
        },
        "ExmEdsProvider": {
          "Type": "string",
          "DefaultValue": "CustomSMTP",
          "Description": "The default EDS provider to be used."
        },
        "EXMCryptographicKey": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "64 digits hexadecimal EXM Cryptographic Key. Takes the form 0x0000000000000000000000000000000000000000000000000000000000000000"
        },
        "EXMAuthenticationKey": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "64 digits hexadecimal EXM Authentication Key. Takes the form 0x0000000000000000000000000000000000000000000000000000000000000000"
        },
        "SolrUrl": {
            "Type": "string",
            "DefaultValue": "https://localhost:8983/solr",
            "Description": "The Solr instance to use."
        },
        "XConnectCollectionService": {
            "Type": "string",
            "DefaultValue": "https://XConnect",
            "Description": "The url for the XConnect Collection Service."
        },
        "XConnectReferenceDataService": {
            "Type": "string",
            "Reference": "XConnectCollectionService",
            "Description": "The url for the XConnect Collection Search Service."
        },
        "MarketingAutomationOperationsService": {
            "Type": "string",
            "Reference": "XConnectCollectionService",
            "Description": "The url for the XConnect Marketing Automation Service."
        },
        "MarketingAutomationReportingService": {
            "Type": "string",
            "Reference": "XConnectCollectionService",
            "Description": "The url for the XConnect Marketing Automation Reporting Service."
        },
        "CortexReportingService": {
            "Type": "string",
            "Reference": "XConnectCollectionService",
            "Description": "The url for the Cortex Reporting Service."
        },
        "SitecoreIdentityAuthority": {
            "Type": "string",
            "DefaultValue": "https://SitecoreIdentityServerHost",
            "Description": "IdentityServer provider URI."
        },
        "SitecoreIdentitySecret": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "Client secret for Sitecore Identity server."
        },
        "TelerikEncryptionKey": {
            "Type": "string",
            "DefaultValue": "SIF-Default",
            "Description": "The key to be used by Telerik controls to encrypt interaction with Content Editors. It's a random string between 32 and 256 symbols long."
        },
        "HostMappingName": {
            "Type": "string",
            "Reference": "SiteName",
            "Description": "The host mapping name of the site."
        },
        "DnsName" :{
            "Type": "string",
            "Reference": "SiteName",
            "Description": "The dns name of the site."
        },
        "InstallDirectory": {
            "Type": "string",
            "Description": "Installation directory"
        }
    },
    "Variables": {
        "Sql.Database.Core": "[concat(parameter('SqlDbPrefix'), '_Core')]",
        "Sql.Database.Security": "[concat(parameter('SqlDbPrefix'), '_Core')]",
        "Sql.Database.Master": "[concat(parameter('SqlDbPrefix'), '_Master')]",
        "Sql.Database.Web": "[concat(parameter('SqlDbPrefix'), '_Web')]",
        "Sql.Database.Reporting": "[concat(parameter('SqlDbPrefix'), '_Reporting')]",
        "Sql.Database.Reference": "[concat(parameter('SqlDbPrefix'), '_ReferenceData')]",
        "Sql.Database.Forms": "[concat(parameter('SqlDbPrefix'), '_ExperienceForms')]",
        "Sql.Database.Pools": "[concat(parameter('SqlDbPrefix'), '_Processing.Pools')]",
        "Sql.Database.Tasks": "[concat(parameter('SqlDbPrefix'), '_Processing.Tasks')]",
        "Sql.Database.MarketingAutomation": "[concat(parameter('SqlDbPrefix'), '_MarketingAutomation')]",
        "Sql.Database.EXM.Master": "[concat(parameter('SqlDbPrefix'), '_EXM.Master')]",
        "Sql.Database.Messaging": "[concat(parameter('SqlDbPrefix'), '_Messaging')]",
 
        "Security.CertificateStore": "Cert:\\Localmachine\\My",
        "Security.XConnect.CertificateThumbprint": "[GetCertificateThumbprint(parameter('XConnectCert'), variable('Security.CertificateStore'))]",
        "Security.XConnect.CertificatePath": "[joinpath(variable('Security.CertificateStore'), variable('Security.XConnect.CertificateThumbprint'))]",
 
        "Solr.Core.Name": "[concat(parameter('SolrCorePrefix'), '_core_index')]",
        "Solr.Master.Name": "[concat(parameter('SolrCorePrefix'), '_master_index')]",
        "Solr.Web.Name": "[concat(parameter('SolrCorePrefix'), '_web_index')]",
        "Solr.MD.Master.Name": "[concat(parameter('SolrCorePrefix'), '_marketingdefinitions_master')]",
        "Solr.MD.Web.Name": "[concat(parameter('SolrCorePrefix'), '_marketingdefinitions_web')]",
        "Solr.MA.Master.Name": "[concat(parameter('SolrCorePrefix'), '_marketing_asset_index_master')]",
        "Solr.MA.Web.Name": "[concat(parameter('SolrCorePrefix'), '_marketing_asset_index_web')]",
        "Solr.Testing.Name": "[concat(parameter('SolrCorePrefix'), '_testing_index')]",
        "Solr.Suggested.Name": "[concat(parameter('SolrCorePrefix'), '_suggested_test_index')]",
        "Solr.FXM.Master.Name": "[concat(parameter('SolrCorePrefix'), '_fxm_master_index')]",
        "Solr.FXM.Web.Name": "[concat(parameter('SolrCorePrefix'), '_fxm_web_index')]",
 
        "Site.PhysicalPath": "[parameter('InstallDirectory')]",
        "Site.DataFolder": "[joinpath(variable('Site.PhysicalPath'), 'App_Data')]",
 
        "Sitecore.Admin.Password": "[parameter('SitecoreAdminPassword'))]",
 
        "SqlCore.Password": "[parameter('SqlCorePassword'))]",
        "SqlMaster.Password": "[parameter('SqlMasterPassword'))]",
        "SqlWeb.Password": "[parameter('SqlWebPassword'))]",
        "SqlProcessingTasks.Password": "[parameter('SqlProcessingTasksPassword'))]",
        "SqlForms.Password": "[parameter('SqlFormsPassword'))]",
        "SqlExmMaster.Password": "[parameter('SqlExmMasterPassword'))]",
        "SqlSecurity.Password": "[parameter('SqlSecurityPassword'))]",
        "SqlProcessingPools.Password": "[parameter('SqlProcessingPoolsPassword')]",
        "SqlReferenceData.Password": "[parameter('SqlReferenceDataPassword')]",
        "SqlMarketingAutomation.Password": "[parameter('SqlMarketingAutomationPassword')]",
        "SqlMessaging.Password": "[parameter('SqlMessagingPassword')]",
        "SqlReporting.Password": "[parameter('SqlReportingPassword')]",
 
        "EXM.CryptographicKey" : "[if(variable('Test.EXM.CryptographicKey'),variable('Generate.EXM.CryptographicKey'),parameter('EXMCryptographicKey'))]",
        "Test.EXM.CryptographicKey": "[equal(parameter('EXMCryptographicKey'),'SIF-Default')]",
        "Generate.EXM.CryptographicKey": "[concat('0x',randomstring(Length:64,DisAllowSpecial:True,DisAllowCaps:True,DisAllowLower:True))]",
 
        "EXM.AuthenticationKey" : "[if(variable('Test.EXM.AuthenticationKey'),variable('Generate.EXM.AuthenticationKey'),parameter('EXMAuthenticationKey'))]",
        "Test.EXM.AuthenticationKey": "[equal(parameter('EXMAuthenticationKey'),'SIF-Default')]",
        "Generate.EXM.AuthenticationKey": "[concat('0x',randomstring(Length:64,DisAllowSpecial:True,DisAllowCaps:True,DisAllowLower:True))]",
 
        "Telerik.EncryptionKey" : "[if(variable('Test.Telerik.EncryptionKey'),variable('Generate.Telerik.EncryptionKey'),parameter('TelerikEncryptionKey'))]",
        "Test.Telerik.EncryptionKey": "[equal(parameter('TelerikEncryptionKey'),'SIF-Default')]",
        "Generate.Telerik.EncryptionKey": "[randomstring(Length:256,DisAllowSpecial:True)]",
 
        "Sitecore.IdentitySecret" : "[parameter('SitecoreIdentitySecret')]",
 
        "Sql.Secure.Password" : "[ConvertToSecureString(String:parameter('SqlAdminPassword'),AsPlainText:true,Force:true)]"
 
    },
    "Register":{
        "Tasks": {
            "RemoveItem": "Remove-Item",
            "WriteInformation": "Write-Information"
        },
        "ConfigFunction": {
            "ConvertToSecureString": "ConvertTo-SecureString"
        }
    },
    "Tasks": {
        "CreatePaths": {
            "Description": "Ensure the destination path for the site exists.",
            "Type": "EnsurePath",
            "Params": {
                "Exists": [ "[variable('Site.PhysicalPath')]" ]
            }
        },
        "CreateAppPool": {
            "Description": "Creates or updates the app pool.",
            "Type": "AppPool",
            "Params": {
                "Name": "[parameter('SiteName')]",
                "Properties": {
                    "ProcessModel": {
                        "identityType": "ApplicationPoolIdentity"
                    }
                }
            }
        },
        "CreateWebsite": {
            "Description": "Creates or updates the IIS website instance.",
            "Type": "Website",
            "Params": {
                "Name": "[parameter('SiteName')]",
                "ApplicationPool": "[parameter('SiteName')]",
                "PhysicalPath": "[variable('Site.PhysicalPath')]"
            }
        },
        "StopWebsite": {
            "Description": "Stops the website if it is running.",
            "Type": "ManageWebsite",
            "Params": {
                "Name": "[parameter('SiteName')]",
                "Action": "Stop"
            }
        },
        "StopAppPool": {
            "Description": "Stops the app pool if it is running.",
            "Type": "ManageAppPool",
            "Params": {
                "Name": "[parameter('SiteName')]",
                "Action": "Stop"
            }
        },
        "CreateBindings": {
            "Description": "Configures the site bindings for the website.",
            "Type": "WebBinding",
            "Params": {
                "SiteName": "[parameter('SiteName')]",
                "Add": [ { "HostHeader": "[parameter('DnsName')]" } ],
                "Remove": [ { "Port": "80", "IPAddress": "*" } ]
            }
        },
        "CreateHostHeader": {
            "Description": "Sets a hostheader for the website.",
            "Type": "HostHeader",
            "Params": {
                "HostName": "[parameter('HostMappingName')]"
            },
            "Skip": "[not(parameter('HostMappingName'))]"
        },
        "SetPermissions": {
            "Description": "Sets permissions for the app pool user.",
            "Type": "FilePermissions",
            "Params": {
                "Path": "[variable('Site.PhysicalPath')]",
                "Rights": [
                    {
                        "User": "[concat('IIS AppPool\\', parameter('SiteName'))]",
                        "FileSystemRights": "FullControl",
                        "InheritanceFlags": [ "ContainerInherit", "ObjectInherit" ]
                    }
                ]
            }
        },
        "SetCertStorePermissions": {
            "Description": "Set permissions for the services to access the client certificate.",
            "Type": "FilePermissions",
            "Params": {
                "Path": "[ResolveCertificatePath(variable('Security.XConnect.CertificatePath'))]",
                "Rights": [
                    {
                        "User": "[concat('IIS AppPool\\', parameter('SiteName'))]",
                        "FileSystemRights": [ "Read" ],
                        "InheritanceFlags": [ "None" ]
                    }
                ]
            }
        },
        "InstallWDP": {
            "Description": "Syncs the web deploy package with the website.",
            "Type": "WebDeploy",
            "Params": {
                "Verb": "Sync",
                "Arguments": {
                    "Source": {
                        "Package": "[resolvepath(parameter('Package'))]"
                    },
                    "Dest": "Auto",
                    "SetParam": [
                        { "Name": "Application Path", "Value": "[parameter('SiteName')]" },
                        { "Name": "Database Server Name", "Value": "[parameter('SqlServer')]" },
                        { "Name": "Sitecore Admin New Password", "Value": "[variable('Sitecore.Admin.Password')]" },
                        { "Name": "Database Admin User Name", "Value": "[parameter('SqlAdminUser')]" },
                        { "Name": "Database Admin User Password", "Value": "[parameter('SqlAdminPassword')]" },
                        { "Name": "Core DB Name", "Value": "[variable('Sql.Database.Core')]" },
                        { "Name": "Security DB Name", "Value": "[variable('Sql.Database.Security')]" },
                        { "Name": "Master DB Name", "Value": "[variable('Sql.Database.Master')]" },
                        { "Name": "Web DB Name", "Value": "[variable('Sql.Database.Web')]" },
                        { "Name": "Reporting DB Name", "Value": "[variable('Sql.Database.Reporting')]" },
                        { "Name": "XDB Reference Data DB Name", "Value": "[variable('Sql.Database.Reference')]" },
                        { "Name": "Experience Forms DB Name", "Value": "[variable('Sql.Database.Forms')]" },
                        { "Name": "Marketing Automation DB Name", "Value": "[variable('Sql.Database.MarketingAutomation')]" },
                        { "Name": "Processing Pools DB Name", "Value": "[variable('Sql.Database.Pools')]" },
                        { "Name": "Processing Tasks DB Name", "Value": "[variable('Sql.Database.Tasks')]" },
                        { "Name": "EXM Master DB Name", "Value": "[variable('Sql.Database.EXM.Master')]" },
                        { "Name": "Messaging DB Name", "Value": "[variable('Sql.Database.Messaging')]" },
                        { "Name": "Core DB User Name", "Value": "[parameter('SqlCoreUser')]" },
                        { "Name": "Core DB User Password", "Value": "[variable('SqlCore.Password')]" },
                        { "Name": "Security DB User Name", "Value": "[parameter('SqlSecurityUser')]" },
                        { "Name": "Security DB User Password", "Value": "[variable('SqlSecurity.Password')]" },
                        { "Name": "Master DB User Name", "Value": "[parameter('SqlMasterUser')]" },
                        { "Name": "Master DB User Password", "Value": "[variable('SqlMaster.Password')]" },
                        { "Name": "Web DB User Name", "Value": "[parameter('SqlWebUser')]" },
                        { "Name": "Web DB User Password", "Value": "[variable('SqlWeb.Password')]" },
                        { "Name": "Reporting DB User Name", "Value": "[parameter('SqlReportingUser')]" },
                        { "Name": "Reporting DB User Password", "Value": "[variable('SqlReporting.Password')]" },
                        { "Name": "XDB Reference Data DB User Name", "Value": "[parameter('SqlReferenceDataUser')]" },
                        { "Name": "XDB Reference Data DB User Password", "Value": "[variable('SqlReferenceData.Password')]" },
                        { "Name": "Experience Forms DB User Name", "Value": "[parameter('SqlFormsUser')]" },
                        { "Name": "Experience Forms DB User Password", "Value": "[variable('SqlForms.Password')]" },
                        { "Name": "EXM Master DB User Name", "Value": "[parameter('SqlExmMasterUser')]"},
                        { "Name": "EXM Master DB User Password", "Value": "[variable('SqlExmMaster.Password')]"},
                        { "Name": "Messaging DB User Name", "Value": "[parameter('SqlMessagingUser')]"},
                        { "Name": "Messaging DB User Password", "Value": "[variable('SqlMessaging.Password')]"},
                        { "Name": "Marketing Automation DB User Name", "Value": "[parameter('SqlMarketingAutomationUser')]" },
                        { "Name": "Marketing Automation DB User Password", "Value": "[variable('SqlMarketingAutomation.Password')]" },
                        { "Name": "Processing Pools DB User Name", "Value": "[parameter('SqlProcessingPoolsUser')]" },
                        { "Name": "Processing Pools DB User Password", "Value": "[variable('SqlProcessingPools.Password')]" },
                        { "Name": "Processing Tasks DB User Name", "Value": "[parameter('SqlProcessingTasksUser')]" },
                        { "Name": "Processing Tasks DB User Password", "Value": "[variable('SqlProcessingTasks.Password')]" },
                        { "Name": "XConnect Collection", "Value": "[parameter('XConnectCollectionService')]" },
                        { "Name": "Xdb Reference Data Client", "Value": "[parameter('XConnectReferenceDataService')]" },
                        { "Name": "XDB MA Reporting Client", "Value": "[parameter('MarketingAutomationReportingService')]" },
                        { "Name": "XDB MA Ops Client", "Value": "[parameter('MarketingAutomationOperationsService')]" },
                        { "Name": "Cortex Reporting Client", "Value": "[parameter('CortexReportingService')]" },
                        { "Name": "XConnect Server Certificate Validation Thumbprint", "Value": "[variable('Security.XConnect.CertificateThumbprint')]" },
                        { "Name": "SOLR Connection String", "Value": "[parameter('SolrUrl')]" },
                        { "Name": "Solr Core Index Name", "Value": "[variable('Solr.Core.Name')]" },
                        { "Name": "Solr Master Index Name", "Value": "[variable('Solr.Master.Name')]" },
                        { "Name": "Solr Web Index Name", "Value": "[variable('Solr.Web.Name')]" },
                        { "Name": "Solr Marketing Definitions Master Index Name", "Value": "[variable('Solr.MD.Master.Name')]" },
                        { "Name": "Solr Marketing Definitions Web Index Name", "Value": "[variable('Solr.MD.Web.Name')]" },
                        { "Name": "Solr Marketing Asset Master Index Name", "Value": "[variable('Solr.MA.Master.Name')]" },
                        { "Name": "Solr Marketing Asset Web Index Name", "Value": "[variable('Solr.MA.Web.Name')]" },
                        { "Name": "Solr Testing Index Name", "Value": "[variable('Solr.Testing.Name')]" },
                        { "Name": "Solr Suggested Index Name", "Value": "[variable('Solr.Suggested.Name')]" },
                        { "Name": "Solr FXM Master Index Name", "Value": "[variable('Solr.FXM.Master.Name')]" },
                        { "Name": "Solr FXM Web Index Name", "Value": "[variable('Solr.FXM.Web.Name')]" },
                        { "Name": "Telerik Encryption Key", "Value": "[variable('Telerik.EncryptionKey')]" },
                        { "Name": "EXM EDS Provider", "Value": "[parameter('ExmEdsProvider')]"},
                        { "Name": "EXM Cryptographic Key", "Value": "[variable('EXM.CryptographicKey')]" },
                        { "Name": "EXM Authentication Key", "Value": "[variable('EXM.AuthenticationKey')]" },
                        { "Name": "Sitecore Identity Authority", "Value": "[parameter('SitecoreIdentityAuthority')]"},
                        { "Name": "Sitecore Identity Secret", "Value": "[variable('Sitecore.IdentitySecret')]"}
                    ]
                }
            }
        },
        "SetLicense": {
            "Description": "Copies the license file to the instance data folder.",
            "Type": "Copy",
            "Params": {
                "Source": "[resolvepath(parameter('LicenseFile'))]",
                "Destination": "[variable('Site.DataFolder')]"
            }
        },
        "StartAppPool": {
            "Description": "Starts the app pool.",
            "Type": "ManageAppPool",
            "Params": {
                "Name": "[parameter('SiteName')]",
                "Action": "Start"
            }
        },
        "StartWebsite": {
            "Description": "Starts the website.",
            "Type": "ManageWebsite",
            "Params": {
                "Name": "[parameter('SiteName')]",
                "Action": "Start"
            }
        },
        "UpdateSolrSchema": {
            "Description": "Update the solr schemas.",
            "Type": "SitecoreUrl",
            "Params": {
                "SitecoreInstanceRoot": "[concat('http://', parameter('DnsName'))]",
                "SitecoreActionPath": "sitecore/admin/PopulateManagedSchema.aspx?indexes=all",
                "UserName": "admin",
                "Password": "[variable('Sitecore.Admin.Password')]"
            }
        },
        "DisplayPassword": {
            "Description": "Displays the admin password.",
            "Type": "WriteInformation",
            "Params": {
                "MessageData": "[concat('Sitecore Admin Password: ',variable('Sitecore.Admin.Password'))]",
                "InformationAction": "Continue"
            }
        }
    },
    "UninstallTasks": {
        "StopWebsite": {
            "Description": "Stops the website if it is running.",
            "Type": "ManageWebsite",
            "Params": {
                "Name": "[parameter('SiteName')]",
                "Action": "Stop",
                "ErrorAction": "SilentlyContinue"
            }
        },
        "StopAppPool": {
            "Description": "Stops the app pool if it is running.",
            "Type": "ManageAppPool",
            "Params": {
                "Name": "[parameter('SiteName')]",
                "Action": "Stop",
                "ErrorAction": "SilentlyContinue"
            }
        },
        "RemoveAppPool": {
            "Description": "Removes the AppPool.",
            "Type": "RemoveAppPool",
            "Params": {
                "Name": "[parameter('SiteName')]"
            }
        },
        "RemoveWebsite": {
            "Description": "Removes the website.",
            "Type": "RemoveWebsite",
            "Params": {
                "Name": "[parameter('SiteName')]"
            }
        },
        "RemoveContent": {
            "Description": "Removes website content.",
            "Type": "RemoveItem",
            "Params": {
                "Path": "[variable('Site.PhysicalPath')]",
                "Recurse": true,
                "ErrorAction": "SilentlyContinue"
            }
        },
        "RemoveHostHeader": {
            "Description": "Removes the hostheader for the website.",
            "Type": "HostHeader",
            "Params": {
                "HostName": "[parameter('SiteName')]",
                "Action": "Remove"
            }
        },
        "RemoveDatabases": {
            "Description": "Removes the databases.",
            "Type": "RemoveSQLDatabase",
            "Params": {
                "ServerName": "[parameter('SqlServer')]",
                "Username": "[parameter('SqlAdminUser')]",
                "Password": "[variable('Sql.Secure.Password')]",
                "DatabaseName": [
                    "[variable('Sql.Database.Core')]",
                    "[variable('Sql.Database.Master')]",
                    "[variable('Sql.Database.Web')]",
                    "[variable('Sql.Database.Forms')]",
                    "[variable('Sql.Database.Tasks')]",
                    "[variable('Sql.Database.EXM.Master')]"
                ]
            }
        }
    }
}