PowerShell

SQL Maintenance Plan SharePoint 2010 databases

SQL Maintenance Plan SharePoint 2010 databases To maintain good overall databases performance of the SharePoint 2010 databases I use the following  SQL maintenance plan. This plan consist of two main parts: – The configuration of each separate databases and database properties settings – The automated maintenance plan, to perform database maintenance task once a week. … Continued

PowerShell error: The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered.

When you run SharePoint management powershell on your SharePoint 2010  server you get the following error: The local farm is not accessible. Cmdlets with FeatureDependencyId are not registered. Solution: Make sure the logged in user has the correct rights to the SharePoint_Configuration database SharePoint_Shell_Acces or: DB_reader or DB_writer Use the following Powershell cmdlet to give … Continued

SharePoint PowerShell Backup Script with Windows Scheduler

An easy script to backup your SharePoint farm with Windows scheduler. First create a powershell script: 1-Backup a site: Add-PSSnapin Microsoft.SharePoint.PowerShell backup-spsite -identity $args[0] -path $args[1] -force 2-Backup the complete farm: Add-PSSnapin Microsoft.SharePoint.PowerShell Backup-SPFarm -Directory $args[1] -BackupMethod full Next, create a .bat script to start the powershell script: @echo off SET SOURCE_SITE=http://sharepointfarm/ SET DEST=E:\SQLBackupFolder\ echo … Continued