# How to enable custom script for SharePoint Online Modern Site
Classic SharePoint Option |
But if you create a new SharePoint Online Modern Site and go to its Site Settings page, you will see the structure of "Web Designer Galleries" like this:
![]() |
Modern SharePoint Option |
Now if you want the structure of your SharePoint Online Web Designer Galleries to be exactly same as the On-Premise one, then you can achieve it using PowerShell. Please see the steps below:
1. First open Windows PowerShell ISE app and run as Administrator.
2. If you are using PowerShell ISE for the first-time on your machine then you will need to set the execution policy to run PowerShell commands on your computer. For setting execution policy enter the below command:
Set-ExecutionPolicy -ExecutionPolicy Unrestricted
Then click on "Yes to All".
3. Then install SharePoint Online PowerShell module so that you can communicate with SharePoint Online Sites through PowerShell. Run the below command:
Install-Module -Name Microsoft.Online.SharePoint.PowerShell
4. Now you can connect to your SharePoint Online Admin Center by entering the below commands back to back. First create a variable to store credentials of SharePoint Admin Center. To do that run below command:
$cred = Get-Credential
Then a pop-up would appear, and you enter your SharePoint Online Admin credentials in there.
5. Now enter the command which will connect you to SharePoint Admin Center with the stored credential.
Connect-SPOService -Credential $cred
1. Set-ExecutionPolicy -ExecutionPolicy Unrestricted
2. Install-Module -Name Microsoft.Online.SharePoint.PowerShell
3. $cred = Get-Credential
4. Connect-SPOService https://eminence2019-admin.sharepoint.com Credential $cred
5. Set-SPOsite https://eminence2019.sharepoint.com/sites/codigo
-DenyAddAndCustomizePages 0
6. Disconnect-SPOService
Wow, we can covert SharePoint modern to classic that's mean i will get content editor web part. is it right?
ReplyDelete