Create New Site Collection with attatched Content Database via powershell script

Possibility of adding as many Content Databases to our SharePoint from Central Administration GUI is the one thing more over there is no way to add specific Content Database to new Site Collection from level of Central Administration. In this case and as often soulution to this is powershell script which can handle it without a problem.

First of all we have to Add Content Database from CA  level i.e. lets call it “Marketing Department” and we can run script which does create a New Site Collection in this case “Marketing Team Website” and attatched “Markieting Department” Content Database to it. From the DBA point of view there is a way better to maintenance those databases which relates by name to direct Sites Collentions.

New-SpSite URL https://mysharepoint/sites/Marketing -owneralias “DOMAIN\SpAdmin” -ContentDatabase Marketing Department -Name Marketing Team Website


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s