Hi @Raj Saraiya,
If you enable custom script in SharePoint admin center. The setting will only last 24 hours. And you can keep the setting by running powershell cmdlet Set-SPOTenant -DelayDenyAddAndCustomizePagesEnforcement $True
. The setting will not automatically switch back to Blocked. But the parameter will be available until November 2024. After that date, enable custom script setting will only last for 24 hours. You will need to change the setting every 24 hours
Currently there is no other alternative function to the powershell cmdlet. We could wait for the official update.
If the answer is helpful, please click "Accept 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.