Following powershell script will provision Managed Metadata service.
Points to be noted:
1. Update $UserProfileServiceAccount with the account with respect to your environment.
2. Save the follwing script on some meaningful name like psProvisionManagedMetaData.ps1
3. Call the file using bacth file & it contains follwoing and save as ProvisionManagedMetaData.bat
cd /d %~dp0
powershell -noexit -file ".\psProvisionManagedMetaData.ps1" "%CD%"
pause
powershell -noexit -file ".\psProvisionManagedMetaData.ps1" "%CD%"
pause
4. $CTypeHubUrl is optional, later you can set it up.
Add-PSSnapin Microsoft.SharePoint.Powershell -EA 0
$ManagedMetadataServiceName ="ManagedMetaDataAppPool"
$ManagedMetaDataServiceAccount = "xxxxxxx"
$CTypeHubUrl = ""
$ManagedMetaDataServiceAccount = "xxxxxxx"
$CTypeHubUrl = ""
$saAppPoolName = New-SPServiceApplicationPool -Name $ManagedMetadataServiceName -Account $ManagedMetaDataServiceAccount
write-host "App pool has been created successfully"
# create new managed meta data service application
$MetadataServiceApp = "Managed Meta Data Service"
New-SPMetadataServiceApplication -Name $MetadataServiceApp -ApplicationPool $saAppPoolName -DatabaseName "SPP_ManagedMetaData_DB"
write-host "Managed meta data service has been successfully created!"
Write-Host "Creating $MetadataServiceApp Application & Proxy..."
$MetadataServiceAppProxy = "Managed Meta Data Service Proxy"
New-SPMetadataServiceApplicationProxy -Name $MetadataServiceAppProxy -ServiceApplication $MetadataServiceApp
Write-Host $MetadataServiceAppProxy "has been successfully provisioned"
write-host "Done!!!!"
Remove-PSSnapin Microsoft.SharePoint.Powershell -EA 0
Thank you vamshi...it was very helpful :-)
ReplyDeleteThanks Radha....
Delete