Home / scripts

scripts

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}

Read More »

Required Permissions in SharePoint Farm for executing PowerShell scripts

Before you execute any of the SharePoint Cmdlet you must be sure that you have necessary permissions to execute in the farm. Also you must have access to local WSS_ADMIN_WPG group where you are executing the cmdlet. Also you must be member of the SharePoint_Shell_Access SQL role within the databases your cmdlet calls in to interact with. Some commands also require you to be a member ...

Read More »