This script creates a site collection in a new content database and sets the maxsitecount to 1 - so no more site collections can be created in that content database
It prompts the user running the script to enter values that will be stored as variables:
#######################################################################
$server = Read-Host “Enter SQL Server”
"Thanks"
$dbname = Read-Host “Enter Database Name”
"Thanks"
$webapp = Read-Host “Enter Web Application URL”
"Thanks"
$site = Read-Host “Enter New Site Collection URL”
"Thanks"
$owner1 = Read-Host “Enter Primary Site Collection Admin”
"Thanks"
$owner2 = Read-Host “Enter Secondary Site Collection Admin”
"Thanks"
New-SPContentDatabase -Name $dbname -DatabaseServer $server -WebApplication $webapp -MaxSiteCount 1 -WarningSiteCount 0
New-SPSite -URL $site -OwnerAlias $owner1 -SecondaryOwnerAlias $owner2 -ContentDatabase $dbname
#########################################################################
Output: Here I ran the script using the full file path - note the additional info displayed
That's all for now
Subscribe to:
Post Comments (Atom)
SharePoint Information Architecture Diagram
Here is the template I use for Information Architecture designs. It's built using Mindjet and I flesh the nodes out with the low level d...
-
Introduction This document is intended to highlight possible causes of poor indexing performance on SharePoint 2007 farms as well as p...
-
SharePoint 2010 Remote BLOB Storage (RBS) Contents Differences between LOCAL and REMOTE FILESTREAM Providers . 3 EBS . 4...
-
Installing the SharePoint Management Packs to SCOM Contents Introduction Steps Raise a change! Download the MP Import the Ma...
No comments:
Post a Comment