Friday, April 24, 2015

Create a Custom Service Connection Group for a SharePoint 2013 Web Application

In my last post, I explained how to add items to the default service connection group (Application Proxy Group) for a web application by using PowerShell. I also described how to use the [custom] group to create application proxy group specific to a single web application. In this post, I'll walk you through the process for creating a custom service connection group that can be reused for multiple web applications. For example, you might want to have a Projects Group in addition to the default connection group.

You can create this group easily using PowerShell by following these steps:

  1. Run the SharePoint 2013 Management Shell as an administrator.
  2. Create the new service connection group using the following PowerShell:

$New = New-SpServiceApplicationProxyGroup -Name "My New Group"

  1. Next, get a list of the current service application proxies:

Get-SpServiceApplicationProxy | Select DisplayName,Id

  1. Copy the Id of each service application proxy that you want to include in your new connection group and add it to a text file with the values separated by commas.
  2. Now add the comma separated list of  proxies as members to your new group (where $New is the name of your connection group):

Add-SpServiceApplicationProxyGroupMember $New -Member <Your list of comma separated Ids>

  1. Your connection group is now added in Central Administration and can be assigned as desired.

Remember, you can remove connection group members by using:
Remove-SpServiceApplicationProxyGroupMember $New -Member <Your list of comma separated Ids>
And, you can remove service connection groups using:

Remove-SpServiceApplicationProxyGroup -Name "<friendly name in quotes or id of your group"

Both of these command require confirmation before executing.

Wednesday, April 22, 2015

Modify the Default Service Connection Group for a SharePoint 2013 Web Application

A sometimes overlooked features of SharePoint 2013 is the ability to create custom Service Application Proxy Groups for individual web applications. You can use this functionality to specify which of your service applications will be available for each of your web applications. For example, you might want to have two search service applications with different configurations and make one service application only open to your external facing web application and the other available to all your other web applications.

From Central Administration, you can see the connection groups under the web application settings (Application Management>Web Applications>Manage Web Applications) by selecting a web application and clicking Service Connections from the ribbon. Out-of-the-box, you will see that a single instance of each service application you have created has been checked and added to the default connection group.

Default Service Application Proxy Group

You will notice that you are not able to change the members of the default proxy group using the Central Administration GUI, but you can select [custom] from the dropdown menu at the top of the window and create a custom proxy group for your web application. You can also use PowerShell to create additional custom proxy groups (more on this in my next post). But, what happens if you want to change the default group?

The default proxy group cannot be changed through the Central Administration GUI, you need to use PowerShell.

Follow these steps to add a member to the default group:

1) Run SharePoint 2013 Management Shell as an administrator
2) Get the default service application proxy group and store it in a variable:
$defprox = Get-SPServiceApplicationProxyGroup -default

3) Get the service application proxy that you want to add to or remove from the default group and store it in a variable. Note, the name in the where statement is the name of the service application proxy that can be found in Central Administration under Application Management>Service Applications>Manage Service Applications or by running Get-SpServiceApplicationProxy from PowerShell:

$newsearch = get-SpServiceApplicationProxy | where {$_.displayname -eq "Search15 Proxy"}

4) To add a member to the default group, run this command:

Add-SPServiceApplicationProxyGroupMember $defprox -Member $

5) To remove a member from the default group, run this command and confirm the removal when prompted:

Remove-SPServiceApplicationProxyGroupMember $defprox -Member $

6) Multiple proxy members can be added or removed from a group by adding them to the -Member property separated by commas, for example:

Add-SPServiceApplicationProxyGroupMember $defprox -Member $, $, $

You can check your results by reopening the Service Connections window in Central Administration. You should see the proxy groups you added with a check in the checkbox next to the item. Items that have been removed will be unchecked.

Sunday, April 5, 2015

Remove Access App Icon From Site Contents After Failed Installation

Recently a user on one of our SharePoint 2013 sites attempted to create an Access 2013 App on their team site and the installation failed because Access 2013 Apps had not been configured on the farm (more on configuring Access in a future blog). Annoyingly, after the failure the grayed out installation icon remained with an intimidating "Sorry, something went wrong with adding the app. Click to retry." message.

Clicking the "Click to retry" link didn't help, but the message changed to "Sorry, something went wrong. Please refresh the page and try again." Of course you can imagine what happened when I refreshed the page ... back to square one.

Fixing this issue is quite simple using PowerShell. Follow these steps:
  1. Logon to your SharePoint application server.
  2. Run the SharePoint 2013 Management Shell as an administrator.
  3. Run the following commands to identify the GUID of the instance that needs to be deleted.
Get-SPAppInstance -Web <Put your SharePoint site URL here> | select title,id
  1.  This will provide you with a list of app instances that looks something like this:
  1. Identify your app and copy its ID.
  2. Then run the following script:
$instance = Get-SPAppInstance -web <YOUR SITE URL> |where {$ -eq "YOUR APP INSTANCE ID IN QUOTES"}
  1. If the app was uninstalled successfully, you will see the response below in PowerShell and the grayed out icon will disappear from your site contents page.
I hope this helps you out and keeps your customers happy!