Thursday 16 April 2015

MYSite Configuration


Visual Guide: Setting up My Sites in SharePoint 2013


One of the SharePoint 2013 puzzle pieces which got some major improvements are My Sites, User Profiles and news feeds. This article describes step-by-step process of setting up the my site infrastructure in the SharePoint Farm.
Prerequisite for setting up My Sites is having user profiles import or sync up and running. You can read more onuser profiles sync in my previous article.
When this has been configured, we can start configuring my sites:
The first step us to go create (according to the best practices) own web application for hosting my sites. Go to the central administration, Application management, “Manage web applications”
01
And create a dedicated web application (sd2013:101 in my example here)
02
Now, the next step would be to create a site collection in the root of the newly created web application. You can of course create it inside some other managed path other than root, but since we have dedicated Web Application, root seems like an obvious choice.
Site Collection must have “2013” experience and use “My Site Host” template.
03
After Site Collection has been created, click on the “Managed Paths”  in the web application that you created to host My Sites.
04
Add a new managed path with wildcard inclusion. I prefer to use “my” as the My Site managed path, but you can of course pick up anything else.
05
The next thing is to check service connections for the Web Application which will host my sites. Click on the “Service Connections” button to…
06
..see if right service applications are set up.
If you choose “Custom” (instead of the “Default”) in the Edit the following group of connections drop down, select any service applications to which you want to connect the web application. The most important ones re User Profile service application, the managed metadata service application, and the Search service application.
In my case, I’ll just proceed with “default”
07
Now it’s time to set up the self service site creation. Go back to the Web application management, chose the application that you created to host My Sites, and click on the “Self Service Site Creation” button.
08
Click “On” in the “Site Collections” radio box, and enter your managed path in the “Start a Site” field (with “Prompt users to create a team site under” chosen)
09
Now, the next step is to grant users permission to create new site collections (for my sites). Click on the “Permission Policy” button in the Web Application management, with the web application which hosts the my sites selected.
10
In the”Manage Permission Policy Levels”, click on the “Add Permission Policy Level”
11
Call it however you want (“MySite Subsite Creation” in my case), and grant the “Create Subsites” permission.
12
Now, the new permission policy level should appear among other policy levels…
13
And we need to grant that policy level to the users. Click on the “Users Policy” button in the Web Application management, with the web application that you created to host My Sites selected…
14
Click on the “Add users” link…
15
From all zones…
16
And select the users which you want to have rights to create my sites. On my case, it will be “Everyone”.
17
18
Select your newly created policy level…
19
And now you should see “Everyone” with the new policy selected.
20
OK, everything has been set up and prepared so far. Now, finally, let’s set up the my sites. Go to the Central Administration –> Application Management, and select “Manage service applications”.
21
Then select the “User Profile Service Application”
22
In the “User Profile Service Application”, click on “Setup My Sites”
23
This is where you need to set up the search center, my host location (in my case – root site collection of the Web Application that serves as the host) and personal site location (managed path within the host web application – “my” in my case). Take a look at the screenshot for all the other fields (which I have used in my case):
24
The only remaining thing would be to set up the timer job for activity feed. Go to the Central Administration –> Monitoring –>Timer Job –> Review job definitions
25
Find the “User Profile Service Application – Activity Feed Job”, and set up the activity feed sync timer according to your needs.
26
timer
And, that’s it.
Go to the my site now, and you will be notified of my site creation for your self. Take care of your profile, follow people. Upload you private documents, share documents, follow documents – enjoy being social! Smile
27
28
29

Making the Newsfeed web part available outside of My Sites in SharePoint 2013

The Newsfeed is a key piece in SP2013’s approach to social computing. It appears on the landing page of My Site as below:
Newsfeed
This is actually a web part titled Newsfeed, and can be found under the Social Collaboration category. Now, you may want to have the Newsfeed on the homepage of your main portal rather than My Site. To make this web part available in your site collection, you will need to activate the feature with title “My Site Layouts Feature“. This is a hidden site collection feature so you will need to use SharePoint Manager or PowerShell. The feature ID is 6928B0E5-5707-46a1-AE16-D6E52522D52B. Its physical location under {SharePointRoot} is TEMPLATE\FEATURES\MySiteLayouts.

This feature brings a number of other web parts and also the MySite.master master page. Check its manifest for further details.

Thursday 2 April 2015

sharepoint application Service instance

Get Service instance name id through power shell

Get-SPServiceInstance > Services.txt 


Stop-SPServiceInstance -Identity GUIDOfUserProfileSynchronization

Troubleshoot User Profile Synchronization Service start issues

Troubleshoot User Profile Synchronization Service start issues (SharePoint Server 2010)

https://technet.microsoft.com/en-us/library/gg750257(v=office.14).aspx

 
Applies to: SharePoint Server 2010
Topic Last Modified: 2011-12-15
This article contains tips for solving problems that you may encounter when you attempt to start the User Profile Synchronization service.
The User Profile Synchronization service interacts with Microsoft Forefront Identity Manager (FIM) to synchronize profile information with external systems such as directory services and business systems. The two FIM services, Forefront Identity Manager Service and Forefront Identity Manager Synchronization Service, are provisioned when you start the User Profile Synchronization service. Being unable to start the User Profile Synchronization service is the most common profile synchronization (profile sync) issue that administrators encounter.
The User Profile Synchronization service can take up to ten minutes to start. The User Profile Synchronization service is successfully started when:
  • The User Profile Synchronization service has a status of Started on the Services on Server page in Central Administration.
  • The Forefront Identity Manager Service and the Forefront Identity Manager Synchronization Service have a status of Started in the Services Microsoft Management Console. Both services run using the farm account.
    importantImportant
    Do not start the FIM services manually in the Services Microsoft Management Console. Starting the FIM services manually or changing the FIM service configuration is not supported.
If a long time has passed since you started the User Profile Synchronization service and the Services on Server page shows a status of either Starting or Stopped, review the following sections to learn more about problems that can cause User Profile Synchronization service start issues.
noteNote
The Services on Server page does not refresh automatically. You must manually refresh the page to see updated information.
In this article:
noteNote
Microsoft periodically releases software updates to fix reported problems. If you do not see your issue described in this article, review the list of software updates to see whether there is a software update that resolves your issue. To see the latest software updates, see Updates for SharePoint 2010 Products (http://go.microsoft.com/fwlink/p/?LinkId=160585).

Incorrect permissions on the farm account

The farm account is used to start the User Profile Synchronization service. The Forefront Identity Manager Service and the Forefront Identity Manager Synchronization Service also run under the farm account. To resolve this issue, do the following:

Determine the farm account

Some people confuse farm administrators with the farm account. Farm administrators are user accounts that are members of the Farm Administrators group. The farm account is the account that was specified when you installed and configured SharePoint Server. The farm account was used to create and access the configuration database. It also acts as the application pool identity account for the SharePoint Central Administration application pool, and it is the account under which the Microsoft SharePoint Foundation Workflow Timer service runs. To determine the farm account, from Central Administration, click Configure service accounts, and then click Farm account. This is the account that is used to start the User Profile Synchronization service and it must be granted the appropriate permissions.
noteNote
Do not use the Service Accounts page to change the account that the User Profile Synchronization service runs under. This is not supported.

Verify that the farm account has the required permissions

Verify that the farm account has the following permissions:
  • The farm account has Log On Locally permission to the server on which you are trying to start the User Profile Synchronization service.
  • The farm account is a member of the Administrators group on the server on which you are trying to start the User Profile Synchronization service.
    noteNote
    This permission is required only to start the User Profile Synchronization service. After the User Profile Synchronization service is started, you can remove the farm account from the Administrators group.
After making changes to the farm account, you must restart the SharePoint 2010 Timer service or restart the server. This ensures that every SharePoint service that is currently running as the farm account is using the latest credentials.

Default schema for the farm account in the synchronization database is not set correctly

The default schema for the farm account in the synchronization database is not set correctly if you used Windows PowerShell to create the User Profile Service application and you were not logged on as the farm account when you created the User Profile Service application. The following error is reported in the Universal Logging System (ULS) log:
Failed to configure ILM, will attempt during next rerun. Exception: System.Data.SqlClient.SqlException: Specified collection 'StringSchemaCollection' cannot be dropped because it is used by object '<farmaccount>.GetObjectCurrent'.
noteNote
We do not recommend logging in as the farm account.
To resolve this issue, delete the User Profile Service application and re-create it by using Central Administration or a Windows PowerShell script. The following procedures show examples of how to use a Windows PowerShell script to create a User Profile Service application.
The server on which you are trying to start the User Profile Synchronization service might have User Account Control (UAC) disabled or enabled. You use one of the two following procedures depending on whether UAC is disabled on the server or UAC is enabled on the server.
To create a User Profile Service application by using Windows PowerShell if UAC is disabled on the server
  1. Verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. Copy the following code and paste it into a text editor such as Notepad:
    $sb = {
      Add-PSSnapin Microsoft.SharePoint.PowerShell
    
      $saAppPool = Get-SPServiceApplicationPool "SharePoint Web Services Default"
      $dbServer="<DBServer>"
      $upa = New-SPProfileServiceApplication -Name "<UPSAppName>" `
      -ApplicationPool $saAppPool `
      -ProfileDBName "<ProfileDBName>" `
      -ProfileDBServer $dbServer `
      -SocialDBName "<SocialDBName>" `
      -SocialDBServer $dbServer `
      -ProfileSyncDBName "<SyncDBName>" `
      -ProfileSyncDBServer $dbServer `
      -ErrorAction SilentlyContinue -ErrorVariable er
      }
    $cred = Get-Credential "<FarmAccount>"
    $job = Start-Job -Credential $cred -ScriptBlock $sb | Wait-Job
    
    Where:
    • <DBServer> is the name of the database server where the profile databases will be created.
    • <UPSAppName> is the name of the User Profile Service application to create.
    • <ProfileDBName> is the name of the profile database to create.
    • <SocialDBName> is the name of the social database to create.
    • <SyncDBName> is the name of the sync database to create.
    • <FarmAccount> is the farm account.
  3. Save the file, naming it Create-UPSApp.ps1.
    noteNote
    You can use a different file name. However, you must save the file as an ANSI-encoded text file whose extension is .ps1.
  4. On the Start menu, click All Programs.
  5. Click Microsoft SharePoint 2010 Products.
  6. Click SharePoint 2010 Management Shell.
  7. Change to the directory where you saved the file.
  8. At the Windows PowerShell command prompt, type the following command:
    ./Create-UPSApp.ps1
    
  9. When prompted, type the farm account password, and then click OK.
For more information, see New-SPProfileServiceApplication.
To create a User Profile Service application by using Windows PowerShell if UAC is enabled on the server
  1. Verify that the farm account is a member of the Administrators group on the local server computer on which you want to run the Windows PowerShell commands, and verify that you meet the following minimum requirements: See Add-SPShellAdmin.
  2. Copy the following code and paste it into a text editor such as Notepad:
    Add-PSSnapin Microsoft.SharePoint.PowerShell
    New-SPProfileServiceApplication -Name "<UPSAppName>" `
      -ApplicationPool $saAppPool `
      -ProfileDBName "<ProfileDBName>" `
      -ProfileDBServer $dbServer `
      -SocialDBName "<SocialDBName>" `
      -SocialDBServer $dbServer `
      -ProfileSyncDBName "<SyncDBName>" `
      -ProfileSyncDBServer $dbServer `
      -ErrorAction SilentlyContinue -ErrorVariable er
    
    
    Where:
    • <UPSAppName> is the name of the User Profile Service application to create.
    • <ProfileDBName> is the name of the profile database to create.
    • <SocialDBName> is the name of the social database to create.
    • <SyncDBName> is the name of the sync database to create.
  3. Save the file, naming it Create-UPSApp.ps1.
    noteNote
    You can use a different file name. However, you must save the file as an ANSI-encoded text file whose extension is .ps1.
  4. On the Start menu, click All Programs.
  5. Click Microsoft SharePoint 2010 Products.
  6. Click SharePoint 2010 Management Shell.
  7. Change to the directory where you saved the file.
  8. Create a new process that runs as an administrator on the local server computer. At the Windows PowerShell command prompt, type the following commands:
    # Get the farm account credentials
    $farmAcct = (Get-SPFarm).DefaultServiceAccount
    $cred = Get-Credential $farmAcct.Name
     
    # Create the User Profile Service application 
    $ScriptFile = "Create-UPSApp.ps1"
    
    # Create a new process with UAC elevation
    Start-Process $PSHOME\powershell.exe -Credential $cred -ArgumentList "-Command Start-Process $PSHOME\powershell.exe -ArgumentList `"'$scriptfile'`" -Verb Runas" -Wait
    
    The User Account Control window appears. Click Yes.
  9. When prompted, type the farm account password, and then click OK.
For more information, see New-SPProfileServiceApplication.

User Profile Synchronization service cannot start because Central Administration Web site uses Secure Sockets Layer

There was an issue with profile synchronization when the Central Administration Web site is configured to use Secure Sockets Layer (SSL). This issue is fixed in the Microsoft SharePoint Server 2010 October 2010 Cumulative Update. For more information about the cumulative update, see http://support.microsoft.com/kb/2394320.

User Profile Synchronization service cannot start after a server restart

If you have a single-box deployment where Active Directory Domain Services (AD DS), SQL Server, and SharePoint Server are all installed on a single server, timing issues may prevent the User Profile Synchronization service from starting. For example, in order to start the two FIM services, SQL Server must be started and be responding to connections. If SQL Server is not up and running when the FIM services are started, the FIM services will not start.
To avoid this issue, you can use the Services Microsoft Management Console to change the start-up behavior of the FIM services from Automatic to Automatic (Delayed Start).

Acknowledgements

The SharePoint Server 2010 Content Publishing team thanks Spencer Harbar, Enterprise Architect, for contributing to this article. His blog can be found at http://www.harbar.net.