Monday, 16 November 2015

Farm service account change in SharePoint 2013

The Following steps describes how to change the Farm Service Account Credentials in SharePoint 2013.

1. Register Managed Account
Launch SharePoint 2013 Central Administration, navigate to Application Management, in Security section click Configure Manage Accounts.
Click Register Managed Account and follow the procedure to add the New Account.

2. Run stsadm
Run Command Prompt as admin.
Navigate to the BIN folder:
cd C:\Program Files\Common Files\microsoft shared\Web Server Extensions\15\BIN
Run stsadm commands on all SharePoint servers, but first run it on APP server which host Central Administration.
STSADM.EXE -o updatefarmcredentials -userlogin "domain\username" -password "P@ssw0rd"
After this is done on all SharePoint server run following command on all SharePoint servers:
iisreset /noforce

3. Update Security Groups on Each SharePoint Server
Set the permissions as below:
ADMINISTRATORS – add the new farm account
WSS_WPG – add the new farm account
WSS_ADMIN_WPG – add the new farm account

4. Configure Service Accounts
Launch Central Administration, select Security, select Configure Service Accounts.
Update the following Accounts:
• Farm Account
• Windows Service – Microsoft SharePoint Foundation Sandboxed Code Service
• Windows Service – User Profile Synchronization Service
• Windows Service – Web Analytics Data Processing Service
• Service Application Pool – SecurityTokenServiceApplicationPool
• Service Application Pool – SharePoint Web Services System

You can remove the old Manage Account or you can leave it, it is up to you.
Confirm that the application pools and Services have been updated.

Monday, 27 July 2015

SharePoint backup full & Differential using power shell script

First, to backup your farm, you can use the PowerShell command Backup-SPFarm. For more details on this cmdlet, refer to http://technet.microsoft.com/en-us/library/ff607881.aspx. You can use the command to backup the farm a full backup as in the following example.
Backup-SPFarm -BackupMethod Full -Directory \\MyServer\SPBackups
And to backup the farm a differential backup, you can use the command as in the following example
Backup-SPFarm -BackupMethod Differential -Directory \\MyServer\SPBackups
To create a PowerShell script file, open a notepad file and save it as *.ps1. Let's create two files - one for the full backup and another for the diff backup.
So create two files: SPFarmFullBackup.ps1 and SPFarmDiffBackup.ps1
In the first file for the full backup, type the following text.
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
Set-ExecutionPolicy -ExecutionPolicy "Unrestricted" -Force
Backup-SPFarm -BackupMethod Full -Directory \\MyServer\SPBackups
Save the file.
In the second file for the differential backup, type the following text.
Add-PSSnapin "Microsoft.SharePoint.PowerShell"
Set-ExecutionPolicy -ExecutionPolicy "Unrestricted" -Force
Backup-SPFarm -BackupMethod Differential-Directory \\MyServer\SPBackups
Save the file.
Now, follow the steps below to create the tasks for Task Scheduler to automate the execution of backup files - let's assume we will full-backup weekly and diff-backup daily.
1 - Open Tools > Tasks Scheduler
2 - In the center pane, right-click, and click Create Basic Task
3 - Assign the task a meaningful name - such as SharePoint-BackupFullWeekly
4 - Choose "Weekly " on the When do you want the task to start screen
5 -  Specify the parameter for the weekly task schedule
6 -  Choose "Start a program" from the what action do you want the task to perform
7 -  On the start a program screen type in the command as the screenshot below. The Task scheduler is intelligent enough to recognize that you want to run PowerShell and that you supplied arguments.
Repeat the steps above to create a task for the diff backup.
Remarks:

Wednesday, 17 June 2015

User Profile Synchronization Service stuck in stopping state in SharePoint 2013 farm

Log on to the Server where User Profile Synchronization Service was stuck in stopping state.

Make sure the Forefront Identity Manager and Forefront Identity Manager Synchronization Service are using the farm account as the service account

Launch SharePoint 2013 Management Shell

Get the GUID for User Profile Synchronization Service
Get-SPServiceInstance | Select-Object TypeName, ID

Check the status of User Profile Synchronization Service

Get-SPServiceInstance -Identity GUIDOfUserProfileSynchronization

To stop this , type the GUID of User Profile Synchronization Serviec

Stop-SPServiceInstance -Identity GUIDOfUserProfileSynchronization

IISRESET on the front end servers.

Friday, 22 May 2015

Installing & Configuring PowerView for SharePoint 2010/2013

After a little bit research on creating PowerView report in SharePoint, I am going to share my experience and list down prerequisites that you must configure with your system before going to create Power View reports.
I had following configuration at server side:
And Silverlight is required at all the machines where you want to access power view reports.
Below is what I did next:

Install SQL server Power Pivot for SharePoint

Run the setup for Microsoft SQL Server 2012 service pack 1. Select SQL Server Power Pivot for SharePoint installation. If you already have a Database Engine then uncheck the option to add database engine to the installation.
SQL Server PowerPivot for SharePoint

Configure Power Pivot for SharePoint

After completing step 1, you will have two configuration tools one is for SharePoint 2010 and other is for SharePoint 2013 to configure Power Pivot for SharePoint.
Go to Start > Programs > Microsoft SQL Server 2012 > Power Pivot Configuration Tool.
Power Pivot Configuration Tool
Start the required configuration tool and validate all the tasks. You might need to add or change some of the input values to pass the validation check. After that run the tool to complete the configuration.
Configure PowerPivot for SharePoint

Install SQL Server reporting service in SharePoint Integrated mode

Run the setup for Microsoft SQL Server 2012 service pack 1. Select the Reporting Services for SharePoint feature for installation.
Reporting Services - SharePoint
After installation make sure that SQL Server reporting services is running in SharePoint.
To check this go to Central Administration > Services on the server
SQL Server Reporting Services Service
Also create a service application for SQL Server Reporting Services Service.
SQL Server Reporting Services Service Application
You need to associate this service to the web applications where you need PowerView Reports.

Install Microsoft SQL Server 2012 SP1 Reporting Services Add-in for Microsoft SharePoint

Download the setup and complete the installation. This will enable you to create and view Power View Reports in SharePoint. To cross check the installations, see the Power View Integration feature is active in site collection features.
Power View Integration feature

Create Power View report

Create a Power Pivot site in SharePoint
PowerPivot Site
Power Pivot site has a pre-built Power Pivot gallery where you can store Power Pivot workbooks and reports. Upload a Power Pivot workbook to the gallery. To create a Power View report from that workbook click on the Power View button as shown in the image below.
Create Power View Report
It will launch the power view report designer where you can create amazing Power View reports.
Power View Report Designer

Configure PowerView(Reporting Services feature)on existing SharePoint 2013 farm with BI Features

Configure Power View (Reporting Services features) on existing SharePoint 2013 Farm with BI features.

Configuration Summary

  • Install SQL Server 2012 SP1 CTP3
  • Uninstall Report Services - Native If you have installed it
  • Install Reporting Services – SharePoint & Reporting Services Add-In for SharePoint Product
  • Install Analysis Services In Tabular Mode and Data Tools
  • Install SharePoint Reporting Service
  • Install and Configure Power Pivot for SharePoint
  • Configure Performance Point Services
  • Configure Reporting Services
  • Check SharePoint Power Pivot Integration

Install SQL Server 2012 SP1 CTP3

First you need need at least SQL Server 2012 SP1 CTP 3 installed in your farm.  If not you can download and install it from here
Better if you can restart the machine after installation.

Uninstall Report Services – Native

If You have already installed Reporting services Native go to Control Panel and Uninstall SQL Server and remove the Reporting Services – Native Feature.
image

Install Reporting Services – SharePoint & Reporting Services Add-In for SharePoint Product

If you are not installed Reporting Services – SharePoint and Reporting services Add –ins
you need to run SQL Server 2012 and select Add features to an existing instance of SQL Server 2012
 image
Select Reporting Services – SharePoint and Reporting services Add –ins for SharePoint Products and Proceed
 image
Then install as Reporting Services SharePoint Integrated Mode
image

Install Analysis Services In Tabular Mode and Data Tools

If you have already installed the Analysis services uninstall in and install it in Tabular Mode.
image
image
after the installation restart the machine . (This is not mandatory)

Install SharePoint Reporting Service

Open the SharePoint Management Shell and run following commands If every thing is fine it will return no errors.
  • Install-SPRSService
  • Install-SPRSServiceProxy
image
Note: If you come across this error you need to install SQL Server 2012 SP1 CTP3 again and restart the machine again.
Install-SPRSService : The term 'Install-SPRSService' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the

Install and Configure Power Pivot for SharePoint

Download PoverPivot for SharePoint.  (http://www.microsoft.com/en-us/download/confirmation.aspx?id=35577)
Run the setup as administrator.
image
image
After the installation you need to run the PowerPivot Configuration as a admin.
 image
image
image
Validate and run the configuration.
image
Configure Performance Point Services
Go to Central Admin and go to Manage service applications and create Performance Point Service Application.
image
When creating the Service Application make sure you inserted the Unattended Service Account.
image
ultimately check PerformancePoint Service is up and running.
image

Configure Reporting Services

Go to Central Admin and go to Manage service applications and create Reporting Service Application.
image
When you are creating make relevant web associations to  your web applications.
image
When service application created navigate to Provision Subscriptions and Alerts
image
and enter spadmin account and make in as Windows Credentials. (This account should have sysadminpermission in the Database )
image
Then make sure SQL server Agent is up and running
image
Then download the Script and execute the SQL.
image


and finally make sure SQL Server Reporting Services is running.
image
Now You are almost over.
Now you need to go to site collection and activate features
Site Collection Features
Performance Point Site Collection Feature
PowerPivot Feature Integration for Site Collections
Site Features
PerformancePoint Site Feature
SharePoint Server Enterprise site feature

Friday, 15 May 2015

SharePoint 2013 site stuck in read only mode

 SharePoint 2013 sites in read-only mode. When I browsed the site I got the following message: “We apologize for any inconvenience, but we’ve made the site read only while we’re making some improvements.”
DH-ReadOnly-Screen1
On further investigation I noticed that the nightly backup of this specific site collection did not complete successfully”. When you backup a Site, SharePoint places the site in read-only mode. But since my backup hanged the site never got out the read-only mode.
When you check the site in the Site Collection Quota and Locks Screen you’ll find all options greyed out:
DH-ReadOnly-Screen2
Luckily since the April 2013 CU update for SharePoint 2013 we now have the SpsiteAdministration.ClearMaintenanceMode method. So we can clear the flag with the flowing two lines:
$site = new-object Microsoft.SharePoint.Administration.SPSiteAdministration(‘http://intranet.demo.local’)
$site.ClearMaintenanceMode()
DH-ReadOnly-Screen7
and your site is out of maintance mode again!
DH-ReadOnly-Screen8

Thursday, 23 April 2015

Excel Services Fix - "The workbook cannot be opened"

When opening an Excel workbook (.xlsx) in the browser the error "The workbook cannot be opened" is thrown:

This is caused by the account running Excel Services not having proper permissions to the Content Database.  When you upload an Excel workbook to a SharePoint library, the workbook is stored as blobs in the Content Database.  When you choose to open this in Excel Services, the account running Excel Services needs to retrieve and reassemble the workbook.  If the account running Excel Services lacks proper permissions, "The workbook cannot be opened".
We have a KB on how to resolve this issue:
The Excel Services Application for SharePoint 2010 does not load or display workbooks
 
In this blog, I will step you through this KB; where to collect data and explain what the two below SharePoint Management Shell Commands do:
 
$w = Get-SPWebApplication –Identity <URL of the Web application>
$w.GrantAccessToProcessIdentity("<insert service account>")
 
You need to find the <URL of the Web application>.  To do this:
 
1. Browse to the report library where the failing workbook is located and make note of the URL.
 
 
2. Central Administration > Application Management > Manage web applications compare the URL to the list of Web Apps.  Find the correct Web App URL and add it to “URL of the web application”.
 
 
You now have the first command: 
 
$w = Get-SPWebApplication –Identity http://tschauer
 
3. Central Administration > Security > Configure Service Accounts > from the first dropdown, select the application pool running "Excel Services Application" and add that account where is says “<insert service account>”.
 
You now have the second command:
$w.GrantAccessToProcessIdentity("Devtest\Excel_Services_Account")
So now you can run these commands by following the below steps:
1. Click Start, click All Programs.
2. Click Microsoft SharePoint 2010/2013 Products.
3. Click SharePoint 2010/2013 Management Shell.
4. At the Windows PowerShell command prompt (PS C:\>), type the following command, and then press ENTER:
$w = Get-SPWebApplication –Identity http://tschauer
$w.GrantAccessToProcessIdentity("Devtest\Excel_Services_Account")
When you run these commands you are:
1. Adding the account running Excel Services as a User to the Content Database (Security > Users).
2. Giving the account running Excel Services the SPDataAccess Membership (Account > Membership)
3. Giving the account running Excel Services Full Control to the Web Application (Via "Policy for Web Application")

Thursday, 22 January 2015

Central Admin stopped unfortunately

List all SharePoint Services on the Server

Get-SPServiceInstance

(OR)

Get-SPServiceInstance | Where-Object {$_.TypeName –eq ‘Central Administration’} | Start-SPServiceInstance

SharePoint Timer Service is not running (Check Administrative Tools, Services on the application server) .  You can check the status with:
Get-SPServiceInstance | Where-Object {$_.TypeName –eq ‘Central Administration’}


 To Start and Stop a SharePoont service you need

Start-SPServiceInstance [GUID] -Confirm


Stop-SPServiceInstance [GUID] -Confirm


Or You can pipe the Service Name to filter the Type Name and confirm your action.

Get-SPServiceInstance | Where-Object {$_.TypeName –eq ‘Central Administration’} |  Start-SPServiceInstance -Confirm