Search This Blog

Sunday, November 15, 2015

Dependency feature 'PPSSiteCollectionMaster' for feature 'PPSSiteMaster' is not activated at this scope.

I was trying to create a new sub site under my site collection while working with Sharepoint 2013 and I got the below error message.

Dependency feature 'PPSSiteCollectionMaster' (id: a1cb5b7f-e5e9-421b-915f-bf519b0760ef) for feature
'PPSSiteMaster' (id:0b07a7f4-8bb8-4ec0-a31b-115732b9584d) is not activated at this scope.
[Cannot provision site: http://servername/sites/site1]

Solution:
1. Go Site Actions -> Site Settings ->Site Collection Administration ->Site collection features ->       PerformancePoint Services Site Collection Features  -> Activate

2. Go Site Actions -> Site Settings ->Site Actions ->Manage site features -> PerformancePoint Services Site Features -> Activate

Powershell to list all SharePoint Site Collections in a web application

Get-SPSite  -Limit All

Powershell to list Content Database details for SharePoint Site Collection

Get-SPContentDatabase -Site 'http://sharepointwebapplicationurl'

Id                           : Content DB ID
Name                     : WSS_Content_DBName
WebApplication    : SPWebApplication Name= XXX
Server                    : XXX
CurrentSiteCount  : 2

Powershell to list all SharePoint Site Collections and subsites a web application


Get-SPSite 'http://sharepointwebapplicationurl' | Get-SPWeb -Limit All

Backup and Restore SharePoint Site using Shell Command


Backup SharePoint Site Shell Command:
Backup-SPSite http://sitename -Path E:\Backup\site_name.bak

Description:
The Backup-SPSite cmdlet performs a backup of the site
collection when the Identity parameter is used. By default, the site collection
will be set to read-only for the duration of the backup to reduce the potential
for user activity during the backup operation to corrupt the backup.

Restore a SharePoint site Shell Command:
Restore-SPSite http://sitename -Path "E:\Backup\file.bak" -Force

Restore a SharePoint site to a specific database Shell Command:
Restore-SPSite http://sitename -Path "E:\Backup\file.bak" -Force -DatabaseName "Database"

Description:
The Restore-SPSite cmdlet performs a restoration of the
site collection to a location specified by the Identity parameter. A content
database may only contain one copy of a site collection. If a site collection
is backed up and restored to a different URL location within the same Web
application, an additional content database must be available to hold the
restored copy of the site collection.

List of all SharePoint custom solutions and deployed web applications in the farm


$File = "D:\SolutionandDeployedWebApplications.txt"
foreach ($solution in Get-SPsolution)
{
echo $solution.Name | Out-File $File -Append
echo $solution.DeployedWebApplications |Format-Table -Property Url | Out-File $File -Append
}


Saturday, November 14, 2015

How to find the Version, Culture and PublicKeyToken of an Assembly (DLL) using PowerShell


([system.reflection.assembly]::loadfile("c:\temp\test.dll")).FullName

The output of this PowerShell statement will provide the Version, Culture and PublicKeyToken as shown below.
Test, Version=1.0.0.0, Culture=neutral, PublicKeyToken=630d986a50055aa6


Restricting Custom People Picker to only one Sharepoint group programatically

Refer the following script files in your page,     <!-- For People Picker -->     <script type="text/javascript" src...