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


Install to global assembly cache without gacutil

In Windows Server 2012 you can't install a DLL to the GAC by drag/drop, but you can do it using GACUTIL.exe.
GacUtil.exe is not present on the server by default.
You can do it using the following script instead of Gacutil.exe

In Windows 2012 you can use the following PowerShell to install dll to GAC

Set-location "c:\temp"
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
$publish = New-Object System.EnterpriseServices.Internal.Publish
$publish.GacInstall("c:\temp\test.dll")
iisreset

In Windows 2012 you can use the following PowerShell to remove dll from GAC:

Set-location "c:\temp"
[System.Reflection.Assembly]::Load("System.EnterpriseServices, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a")
$publish = New-Object System.EnterpriseServices.Internal.Publish
$publish.GacRemove("c:\temp\test.dll")
iisreset


Thursday, November 5, 2015

Inside Update panel calendar picker controls are not working

When we are using update panel we may face some issues. In that one of the major issue is using calendar picker control inside update panel. 
To over come this issue we have to include the following script tag.

<script type="text/javascript" src="/_layouts/datepicker.js"></script>

Now we can use calendar picker inside update panel without any issues.

thanks,

Inside Update panel people editor is not working

When we are using update panel we may face some issues. In that one of the major issue is using people editor control inside update panel. Update panel does not allow post back. So people editor will not resolve the users.
To over come this issue we have to include the following script tag.

<script type="text/javascript" src="/_layouts/15/entityeditor.js"></script>

Now we can use people editor inside update panel without any issues.

thanks,

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...