Creating custom proxy groups and adding members in SharePoint 2010

One of the many changes that SharePoint 2010 brings us is the ability to get granular with what service application assignments to various web applications with the use of proxy groups. Out of the box, you have two choices: Default and Custom.

Default is a grouping that you can control what's in it by going into Central Admin | Application Management | Configure Service Application Associations and clicking the default Application Proxy Group. This will bring a dialog that allows you to select from the provisioned service applications and make your default group. Custom is the other one you get out of the box. Custom, however, is just a one-off custom selection of the provisioned service applications. It's not like applying a pre determined group setting, it's an ad-hoc choice of the provisioned applications.

This is fine and all if you just want a one-off set of assignments. But what if you wanted to have a couple of pre-canned groupings to select from in a repeatable manner? Enter, powershell.

Using powershell, you can create a custom proxy group and assign service application proxies into the group to be available as a drop down selection on your web applications in Central Admin. Interestingly enough, once you assign one of your web applications to use your new custom proxy group, you now have a link in Central Admin that is directly to your proxy group that gives you a nice UI to pick and choose what is associated with your custom proxy group. So, creating the group and adding at least one group member is just a one time activity per group you create. Once it's created and associated with a web application, it's back to the UI for you...unless you just really like powershell.

Below is the required powershell to create a custom proxy group and add a service application proxy to that group.

 #Create new proxy group

$newProxyGroup = Add-SPServiceApplicationProxyGroup -name "My Custom Proxy Group"

#Get reference to the proxy of the service application

$metaDataProxy = Get-SPServiceApplicationProxy | Where{$_.DisplayName.StartsWith("MetaData")}

#Add proxy member to new proxy group

Add-SPServiceApplicationProxyMember -identity $newProxyGroup -member $metaDataProxy