Initialize-WebSitesInstance

Creates and configures a website.

Syntax

Initialize-WebSitesInstance
          [[-Settings] <Hashtable>]
          [-Force]
          [<CommonParameters>]

Description

The Initialize-WebSitesInstance cmdlet creates and configures a website. Configuration information comes from a user-created hash table: a data structure containing property names and their associated values.

Examples

Example 1: Create and configure a website

PS C:\> $ControllerInitializationSettings = @{ hosting = "Server=CN-SERVER;Initial Catalog=Hosting;User ID=sa;Password=Password01!"; resourceMetering = "Server=CN-SERVER;Initial Catalog=ResourceMetering;User ID=sa;Password=Password01!"; managementServerAdminUserName = "{0}\Admin"; managementServerAdminPassword = "Password01!"; fileServerAdminUserName = "{0}\Admin"; fileServerAdminPassword = "Password01!"; frontEndAdminUserName = "{0}\Admin"; frontEndAdminPassword = "Password01!"; publisherAdminUserName = "{0}\Admin"; publisherAdminPassword = "Password01!"; workerAdminUserName = "{0}\Admin"; workerAdminPassword = "Password01!"; adminUserName = "{0}\RestMwhImpersonation"; adminPassword = "Password01!"; dnsSuffix = "test.com"; managementServerName = "MN-SERVER"; fileServerName = "FS-SERVER"; fileServerType = "WindowsSingle"; fileShareOwnerUserName = "FileShareOwner"; fileShareOwnerPassword = "Password01!"; fileShareUserUserName = "FileShareUser"; fileShareUserPassword = "Password01!"; cloudAdminUserName = "administrator"; cloudAdminPassword = "Password01!"; centralCertStoreUserName = "Certificateshareuser"; centralCertStorePassword = "Password01!"; contentShareUNCPath = "\\FS-SERVER\Websites"; contentShareLocalPath = "C:\Websites"; certificateShareUNCPath = "\\FSSERVER01\Certificates"; certificateShareLocalPath = "C:\Certificates"; feedUrl = "http://FeedURL/feeds/List.xml"; customFeeds = "http://FeedURL/Products.xml"; SQMEnabled = "False"; MicrosoftUpdateEnabled = "True" }
PS C:\> Initialize-WebSitesInstance -Settings $ControllerInitializationSettings -Verbose

These two commands create a website by using the Initialize-WebSitesInstance cmdlet. The first command in the example creates a hash table containing the configuration values for the new site. This hash table is stored in the variable $ControllerInitializationSettings.

The second command then uses $ControllerInitializationSettings and the Initialize-WebSitesInstance cmdlet to create and configure the new website.

Parameters

-Force

{{Fill Force Description}}

Type:SwitchParameter
Position:Named
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False

-Settings

Specifies a hash table containing configuration information for the new website. Each entry in the hash table consist of a property name followed by an equals sign, followed by the property value, For example, this syntax contains a single property (hosting):

@{hosting = "Server=CN-SERVER;Initial Catalog=Hosting;User ID=sa;Password=Password01!"}

Multiple properties are specified by using semicons to separate individual entries. For example, this syntax contains two properties (hosting and fileServerType) :

@{hosting = "Server=CN-SERVER;Initial Catalog=Hosting;User ID=sa;Password=Password01!"; fileServerType = "WindowsSingle" }

See Web Site Clouds troubleshooting for more examples.

Type:Hashtable
Position:1
Default value:None
Required:False
Accept pipeline input:False
Accept wildcard characters:False