Saturday, February 1, 2014

Create Service Application Proxy Group in SharePoint 2013 using PowerShell

SharePoint Proxy groups associates service application proxies with Web Applications. By default, SharePoint creates a proxy group called "Default" and adds new service applications to "Default Proxy Group" when created via SharePoint central administration. A Service Application Proxy can be associated with multiple Proxy Groups using PowerShell. Similarly, a Proxy Group is NOT required to host all available Service Applications within the farm.

You can get the available proxy groups by going to Central Admin >> Application Management >> Manage Web Applications >> Select any web application and click on "Service Connections" from the ribbon.

sharepoint 2010 create proxy group powershell

While creating Service applications through PowerShell, You have to explicitly specify "-DefaultProxyGroup" switch to add the service application proxy to default group.
New-SPStateServiceDatabase -Name "StateServiceDB" -DatabaseServer 
$databaseServerName | New-SPStateServiceApplication -Name $stateSAName |
 New-SPStateServiceApplicationProxy -Name "$stateSAName Proxy" 
-DefaultProxyGroup 

Manage Proxy Group in SharePoint 2013 using PowerShell
There is no UI in SharePoint to create our own proxy group. So, Lets create a proxy group in SharePoint using PowerShell:
Add-PSSnapin Microsoft.SharePoint.PowerShell -ErrorAction SilentlyContinue

#Get all proxy groups
Get-SPServiceApplicationProxyGroup  | Format-Table -Wrap
Create Proxy Group in SharePoint 2013 using PowerShell
#Create new proxy group
 $NewProxyGroup = New-SPServiceApplicationProxyGroup -Name "Intranet Service Applications"
Add a service application proxy to new proxy group:
#Get an existing Proxy Group
$ProxyGroup = Get-SPServiceApplicationProxyGroup -Identity "Intranet Service Applications"

#Get an existing Service App proxy to add to New Proxy group
$MMSProxy = Get-SPServiceApplicationProxy | ? { $_.DisplayName -eq "Hosting Farm Tenant Managed Metadata Service Proxy"}
#Add new member to new Proxy group
Add-SPServiceApplicationProxyGroupMember -identity $NewProxyGroup -Member $MMSProxy
Add all available service application proxies to New Proxy group in SharePoint 2010 using PowerShell
#Add All existing Service App proxies to New Proxy group
Get-SPServiceApplicationProxy | ForEach-Object { Add-SPServiceApplicationProxyGroupMember -identity $NewProxyGroup -Member $_ }
How to remove a member from Proxy Group
#To Remove Proxy group member
Remove-SPServiceApplicationProxyGroupMember -Identity $NewProxyGroup -Member $MMSProxy
Remove a Proxy Group in SharePoint using PowerShell
#Remove a Group Group
Remove-SPServiceApplicationProxyGroup -Identity "Intranet Service Applications" 
Here is the screenshot of new proxy group created:
sharepoint 2013 create proxy group PowerShell



You might also like:
SharePoint Usage Reports
Usage reports, collaboration and audit for SharePoint.
Document SharePoint Farm
Automatically generate SharePoint documentation.
*Sponsored


Check out these SharePoint products:

No comments :

Post a Comment

Please Login and comment to get your questions answered!

You might also like:

Related Posts Plugin for WordPress, Blogger...