I have found Powershell script to create Web Application, But I don't find how to associate it with custom Managed Metadata Service application. I Need help to write Powershell script how to associate custom MMS to Web Application?


1)Replace the Name of the service with Managed Metadata service

$serviceAppProxy = Get-SPServiceApplicationProxy | where { $_.Name -eq “Name of the service” }

2)Get the Proxy group e.g. Default . If you have a different one replace the name proxygroup default with your custom proxy group.

In the step 2 Get-SPServiceApplicationProxyGroup gives you the list of the all the proxy groups.

 $proxygroup = Get-SPServiceApplicationProxyGroup | where { $_.FriendlyName -eq “[default]” }

The web applications are associated to the proxy group. The proxy group in turn contain the list of the service applications that are associated to it.

3) Add the service application

Add-SPServiceApplicationProxyGroupMember -Identity $proxygroup -Member $serviceAppProxy

4) If you need to associated a particular web application

$web= Get-SPWebApplication |?{$_.DisplayName -like"*Web application Name*" }

$web.ServiceApplicationProxyGroup=Get-SPServiceApplicationProxyGroup | where { $_.FriendlyName -like “*default*” } 

If you need to create a New Proxy group

New-SPServiceApplicationProxyGroup -Name RemoteProxyGroup
| improve this answer | |
  • Thats fine, but on step 3: How i associate/add service application to the Web Application? need powershellscript here: – SPBeginer Mar 2 '15 at 11:02
  • At step 4: script successfully associated my web application with new ServiceApplicationProxyGroup. but when i go to central admin, i see web application is still associated with default group. why is that? – SPBeginer Apr 2 '15 at 21:36

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.