Tag: PowerShell

“The request message is too big. The server does not allow messages larger than 2097152 bytes.” error

Change the message limit to 2GB

$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$settings = $contentService.ClientRequestServiceSettings
$settings.MaxReceivedMessageSize = 2147483647
$settings.MaxParseMessageSize = 2147483647
$contentService.Update()

Reset the settings

$contentService = [Microsoft.SharePoint.Administration.SPWebService]::ContentService
$settings = $contentService.ClientRequestServiceSettings
$settings.MaxReceivedMessageSize = 0
$settings.MaxParseMessageSize = 0
$contentService.Update()

 

Configure App Management Service Application in SharePoint 2016

$accountName = "CONTOSO\joeylicc"
$svcAppPoolName = "AppManagementServiceApplicationPool"
$svcAppName = "App Management Service Application"
$dbServer = "{SERVER_NAME}\SHAREPOINT"
$dbName = "App_Management"
$svcAppProxyName = "App Management Server Application Proxy"

$account = Get-SPManagedAccount $accountName
$appPool = New-SPServiceApplicationPool -Name $svcAppPoolName -Account $account
$svcApp = New-SPAppManagementServiceApplication -Name $svcAppName -DatabaseServer $dbServer -DatabaseName $dbName -ApplicationPool $appPool
New-SPAppManagementServiceApplicationProxy -Name $svcAppProxyName -UseDefaultProxyGroup -ServiceApplication $svcApp

See Also