PowerShell script to create a Managed Metadata Service Application in SharePoint


Here is the PowerShell script to create a Managed Metadata Service Application in SharePoint

$serviceAppName = "Managed Metadata Service Application"
$serviceAppProxyName = "Managed Metadata Service Application Proxy"

$appPoolAccount = Get-SPManagedAccount "<Service Account>"
$appPool = New-SPServiceApplicationPool -Name "$serviceAppName App Pool" -Account $appPoolAccount

$serviceApp = New-SPMetadataServiceApplication -Name $serviceAppName -ApplicationPool $appPool -DatabaseName "$serviceAppName DB"
$serviceAppProxy = New-SPMetadataServiceApplicationProxy -Name $serviceAppProxyName -ServiceApplication $serviceApp

Get-SPServiceApplicationProxyGroup | Set-SPServiceApplicationProxyGroup -DefaultProxyGroup

Replace "<Service Account>" with the appropriate service account for the application pool.

Also, replace "$serviceAppName" and "$serviceAppProxyName" with your desired names for the Managed Metadata Service Application and its proxy, respectively.

Comments

Popular posts from this blog

Get current GPS location in PowerApps

Create Azure AD groups from a CSV file