On mostly SharePoint farms scripting capabilities are enabled, but on some farms they are disabled
In order to enable scripting capabilities you need to do the following:
1. Open SharePoint Management Shell on any server of SharePoint 2019 Farm
2. Execute the following PowerShell command:
2. Execute the following PowerShell command:
(Get-SPSite -Identity "http://sharepointserver/sites/contoso").DenyPermissionsMask =
[Microsoft.SharePoint.SPBasePermissions]::EmptyMask