Enable Script capability on sharepoint server 2019

Kuronuma 160 Reputation points
2024-07-03T00:47:11.1366667+00:00

I want to enable script capability on sharepoint server 2019 so I run the following commanimage

Which mean the script capability is enable for whole sites as I am using the central administration URL here

Or am I mistaken?? Do I need to use a site URL instead of server URL??

Also How can we know the script capability is enable for sharepoint server from GUI??

What If I want to reverse the command and again want to disable???

SharePoint Server
SharePoint Server
A family of Microsoft on-premises document management and storage systems.
2,285 questions
SharePoint Server Management
SharePoint Server Management
SharePoint Server: A family of Microsoft on-premises document management and storage systems.Management: The act or process of organizing, handling, directing or controlling something.
2,877 questions
{count} votes

1 answer

Sort by: Most helpful
  1. AllenXu-MSFT 17,666 Reputation points Microsoft Vendor
    2024-07-03T06:53:46.48+00:00

    Hi @Kuronuma,

    Yes, you need to use a site URL there instead of server URL as the parameter -Identity

    specifies the URL or GUID of a site collection to get. For example:

    Get-SPSite -Identity "http://sharepointserver/sites/contoso".
    

    This command only applies to the specific site collection you specified in the -Identity parameter, not to the entire SharePoint Server 2019 farm.

    As per my knowledge, SP 2019 supports custom script by default. Generally, there is no need to apply the above PowerShell command unless you have problems when applying custom codes. So, in SharePoint 2019, there is no GUI to check script capability and also no interface to disable it.


    If the answer is helpful, please click "Accept as Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".

    Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.