Tuesday, February 14, 2017

Create State service application.

A state service application is the container for state service databases.

Using Windows PowerShell

1. Click SharePoint 2013 Management Shell.
2. From the Windows PowerShell command prompt (that is, PS C:\>), type the following command :

New-SPStateServiceDatabase -Name "State Service Database" | New-SPStateServiceApplication -Name "StateServiceApp1" | New-SPStateServiceApplicationProxy -DefaultProxyGroup

Create a Visio Graphics Service service application

Using Central Administration

To create a service application, you must be a member of the farm administrators group.

1. Browse SharePoint 2013 Central Administration.
2. On the SharePoint Central Administration website Home page, in the Application Management section, click Manage service applications.
3. On the ribbon, click New, and then click Visio Graphics Service. Type a name for the new service application.
4. Choose an existing application pool or create a new one.
5. Choose whether to create a Visio Graphics Service Application Proxy (recommended).Click OK.

Using Windows PowerShell

1. Click SharePoint 2013 Management Shell.
2. From the Windows PowerShell command prompt (that is, PS C:\>), type the following command :

New-SPVisioServiceApplication -Name <ServiceAppName> -ApplicationPool <AppPoolName> -AddToDefaultGroup

Example
New-SPVisioServiceApplication -Name "Visio Graphics Service Application" -ApplicationPool "SharePoint Hosted Services" -AddToDefaultGroup

SharePoint: Missing “Manage services on server” in Central Administration

Issue
I was browsing to Central Administration site and on SharePoint 2013 but the “Manage services on server” menu option was completely missing even though I’m a Farm Administrator.



Fix
This menu option will only show up if IE is running in Administrator mode.   Right click on the IE icon  and choose “Run as Administrator”.

Tuesday, December 13, 2016

How to Start and Stop the Distributed Cache service

To start and stop the Distributed Cache service by using Central Administration

1. In Central Administration, click Application Management.
2. In Service Applications, click Manage Services on Server.
3. On the Services on Server page, locate the Distributed Cache service.
4. If the Distributed Cache service is started and you want to stop the service, under Action, click Stop. If the Distributed Cache service is stopped and you want to start the service, under Action, click Start.

To start the Distributed Cache service by using SharePoint 2013 Management Shell


At the SharePoint Management Shell command prompt, run the following command:

1. $instanceName ="SPDistributedCacheService Name=AppFabricCachingService"
2. $serviceInstance = Get-SPServiceInstance | ? {($_.service.tostring()) -eq $instanceName -and ($_.server.name) -eq $env:computername}
3. $serviceInstance.Provision()

SharePoint Distributed Cache

SharePoint 2013 introduces a new concept called Distributed Cache. The Distributed Cache service, which is built on Windows Server AppFabric Cache, is set to run in a collocated mode on all SharePoint 2013 Servers by default, using up to 10% of the server's total physical memory. It’s essential for maintaining the large amounts of information on your SharePoint Server, ensuring that the information is fresh and readily available for the end user.

The Distributed Cache service provides caching functionality to features (not to be
confused with site features) in SharePoint Server 2013. The Distributed Cache service is either required by or improves performance of the following features:
  • Authentication
  • Newsfeeds
  • OneNote client access
  • Security Trimming
  • Page load performance
Caching functionalities, provided by the Distributed Cache service, enable the SharePoint features listed above to quickly retrieve data without any dependency on databases stored in SQL Server, as everything is stored in memory.

Related Topic : Start and Stop the Distributed Cache service

Friday, December 2, 2016

How to find the Workflow Service URL for a SharePoint 2013 Farm using Powershell

To find the registered workflow service address for a SharePoint 2013 farm :

Add-PSSnapin Microsoft.SharePoint.PowerShell
[Void][System.Reflection.Assembly]::loadwithpartialname("Microsoft.SharePoint.WorkflowServicesBase")
$web = Get-SPSite -Limit 1 -WarningAction SilentlyContinue | Get-SPWeb
$wfm = New-Object Microsoft.SharePoint.WorkflowServices.WorkflowServicesManager($web)
$wfm | SELECT *

The above powershell commands returns the below value :

https://abc.xyz.com:12290/SharePoint/

The /SharePoint/ segment of the URL is added by SharePoint during registration process, you should not add segment to your registration URL.

Thursday, December 1, 2016

How to create a SharePoint Subscription Settings Service application through PowerShell

This example assumes that a managed account for DOMAIN\ManagedAccount already exists. 

$AppPool = New-SPServiceApplicationPool -Name SettingsServiceAppPool -Account (Get-SPManagedAccount DOMAIN\ManagedAccount)

$App = New-SPSubscriptionSettingsServiceApplication -ApplicationPool $appPool -Name SettingsServiceApp -DatabaseName SettingsServiceDB

$proxy = New-SPSubscriptionSettingsServiceApplicationProxy -ServiceApplication $App

Get-SPServiceInstance | where{$_.TypeName -eq "Microsoft SharePoint Foundation Subscription Settings Service"} | Start-SPServiceInstance

This example creates
- an application pool
- a new subscription settings service application
- a subscription settings service application proxy

- and starts the service instance on the local machine. 

Wednesday, November 23, 2016

How to retrieve a List of Application Pools in a Server

From the UI

1. Open IIS Manager. For information about opening IIS Manager, see Open IIS Manager (IIS 7).

2. In the Connections pane, click Application Pools in the tree.

From Command Line

1. Open command prompt.

2. Type "cd C:\Windows\System32\inetsrv" [Appcmd.exe exists at the location %systemroot%\system32\inetsrv\]

3. Type "appcmd list apppool"

Thursday, September 22, 2016

How to Force Log In To Remote Desktop Computer When The Session is Already Full

Use the below command in Run

mstsc /v:[SERVERNAME] /admin

That should force you into the server if the session is full.


No content databases in the web application were available to store your site collection

Recently I had tried deleting a site collection and tried restoring the site with the same URL and I got the below error

Restore-SPSite https://sitecollectionurl -Path "E:\filename.bak" -Force

“ Restore-SpSite : The operation that you are attempting to perform cannot be completed successfully. No content databases in the web application were available to store your site collection. The existing content databases may have reached the maximum number of site collections, or be set to read-only, or be offline, or may already contain a copy of this site collection. Create another content database for the Web application and then try the operation again “


How to fix this

Restore-SPSite https://sitecollectionurl -Path "E:\filename.bak" -Force –DatabaseServer "DBServerName" -DatabaseName "DBName"

And it worked this time. Site was successfully restored.
This happened because I was trying to restore or create a new site with the same url that was deleted some time back. There is a chance it has not been removed from the database permanently

Alternatively, to delete the old site, do the below steps

Get-SPDeletedSite

If the site exist with the same URL remove using

Remove-SPDeletedSite -Identity