How to Set SharePoint 2013 Content Database to Read Only Mode using PowerShell?

Requirement: Set content database to read only in SharePoint 2013 using PowerShell. Solution:  We may have to set SharePoint databases to read-only mode in scenarios such as: upgrades, disaster recovery / highly available maintenance, patching, etc. Setting SharePoint content database in read-only mode from SQL Server Management Studio is explained in my…

Read more

How to Move SharePoint Content Databases to Another Drive?

Requirement: Move SharePoint content database from one drive to another in SQL Server! By default, SharePoint creates its databases in the default SQL Server location: “C:\Program Files\Microsoft SQL Server\MSSQL13.MSSQLSERVER\MSSQL\DATA” folder (SQL Server 2016). We don’t have any option from SharePoint side to specify where the data and log files for the database…

Read more

Replace “Edit” Permissions with “Contribute” in SharePoint 2016 using PowerShell

Problem: Prior to SharePoint 2013, Members group of the site has “Contribute” permission. From SharePoint 2013, there was a new permission level “Edit” introduced with more rights. This introduced additional issue like members can delete lists and libraries! How to Replace “Edit” Permission with “Contribute” in SharePoint? Remove Edit permissions and add…

Read more

SharePoint Online: Remove a Site Column from Content Type using PowerShell

Requirement: Remove a Site Column from Content Type in SharePoint Online. How to Remove a Column from Content Type in SharePoint Online? When you remove a site column from a content type, It does not delete the column from SharePoint Online. It simply removes the site column’s association from the particular content…

Read more

SharePoint Online: Remove a Field from List Content Type using PowerShell

Requirement: Remove a field from SharePoint list content type in SharePoint Online. PowerShell to Remove a Column from List Content Type in SharePoint Online: When you remove a column from content type, that field become a local column in any list or library which are using that content type!

Read more

Fix “MissingAssembly” Errors of Test-SPContentDatabase in SharePoint 2013 Migration

Problem:During SharePoint 2013 migration, we ran Test-SPContentDatabase cmdlet and the output report contains several MissingAssembly errors! Category        : MissingAssemblyError           : TrueUpgradeBlocking : FalseMessage         : Assembly [DealEventEventhandler, Version=1.2.6.0, Culture=neutral, PublicKeyToken=b4122bae67581526] is referenced in the database [wss_content], but is not installed on the current farm. Please install any feature/solution which contains this assembly.Remedy          :…

Read more

Remove a Web Part from All Pages in SharePoint Site Collection using PowerShell

Requirement: After the SharePoint migration from SharePoint 2013 to SharePoint 2016, decided to remove a broken web part from all pages wherever its being used. How to Remove a Web Part from Page in SharePoint? To remove a web part from the page, you can edit the page and simply delete the…

Read more

SharePoint Online: How to Add a Site Column to Content Type using PowerShell?

Requirement:  Add a site column to content type in SharePoint Online using PowerShell. How to add a field to an existing content type in SharePoint? By default, Title column gets added to the content type. However, you may want to add additional columns.  Go to the SharePoint Online site where you want…

Read more

Test-SPContentDatabase: Fix MissingWebPart Issue in SharePoint 2013 Migration

Problem: MissingWebPart Issues when running Test-SPContentDatabase cmdlet on SharePoint content database during SharePoint 2013 migration project. Category                : MissingWebPartError                      : TrueUpgradeBlocking  : FalseMessage                : WebPart class [9a43cf43-4500-d748-6385-09e622f28c01] is referenced [3] times in the database [WSS_Content_Database], but is not installed on the current farm. Please install any feature/solution which contains this web part.Remedy                …

Read more

Fix MissingSetupFile Error of Test-SPContentDatabase in SharePoint Migration

Problem: Getting “MissingSetupFile” errors when you run the “Test-SPContentDataBase” cmdlet on SharePoint content databases during a migration process. [MissingSetupFile] File [Features\Feature-folder\feature-artifact] is referenced [1] times in the database [SharePoint_Content_database], but is not installed on the current farm. Please install any feature/solution which contains this file. One or more setup files are referenced…

Read more