When creating a Service application to a SharePoint server,
we need to attach that service to Default Application proxy. We can attach the
service application using following Power Shell commands,
Get the Service application proxy by using Get-SPServiceApplicationProxy
command
$ServiceAppProxy= Get-SPServiceApplicationProxy |
where { $_.Name -eq “Name of the service Application” }
Get default proxy group by using Get-SPServiceApplicationProxyGroup
command.
$serviceProxyGroup = Get-SPServiceApplicationProxyGroup |
where { $_.FriendlyName -eq “default” }
Add service application proxy group to default proxy group
using Add-SPServiceApplicationProxyGroupMember command.
Add-SPServiceApplicationProxyGroupMember
-Identity $serviceProxyGroup -Member $serviceProxyGroup
By combining all commands we can see the script
as
$ServiceAppProxy= Get-SPServiceApplicationProxy |
where { $_.Name -eq “Name of the service Application” }
$serviceProxyGroup = Get-SPServiceApplicationProxyGroup |
where { $_.FriendlyName -eq “default” }
Add-SPServiceApplicationProxyGroupMember
-Identity $serviceProxyGroup -Member $serviceProxyGroup