Home / powershell / SharePoint Content database – maxsitecount and warningsitecount – PowerShell

SharePoint Content database – maxsitecount and warningsitecount – PowerShell

Quick Help Script:

How to set the maxsitecount and warningsitecount  on a content database either after the upgrade or migration or even after moving the content database from different farm or web application.

Add-PSSnapin microsoft.sharepoint.powershell
$dbs = get-spcontentdatabase -webapplication https://webapplicationname
foreach($db in $dbs.name) {Set-SPContentDatabase -Identity $db -MaxSiteCount 1 -WarningSiteCount 0}

 

About Venu Madhav

Check Also

Delete duplicate fields in a sharepoint list based on internal name

I have a similar issue where a content and structure migration created duplicate fields and ...

Leave a Reply