Domanda

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?

È stato utile?

Soluzione

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
Autorizzato sotto: CC-BY-SA insieme a attribuzione
Non affiliato a sharepoint.stackexchange
scroll top