Maintain control of your Microsoft 365 data
Post Reply
MikeFranz
Veeam Software
Posts: 26
Liked: never
Joined: Oct 21, 2013 2:16 pm
Full Name: Mike Franz
Contact:

PowerShell commands for Sharepoint web parts warning

Post by MikeFranz »

Does anyone know if there's a way to exclude sites that don't have the DenyAddAndCustomizePages setting from these commands?

$sites = Get-SPOSite -Limit All

foreach ($site in $sites) { Set-SPOsite $site -DenyAddAndCustomizePages 0 }

I always get errors that it can't be set on the MySite host and PointPublishing site collections.
MikeFranz
Veeam Software
Posts: 26
Liked: never
Joined: Oct 21, 2013 2:16 pm
Full Name: Mike Franz
Contact:

Re: PowerShell commands for Sharepoint web parts warning

Post by MikeFranz »

I found something that should work for this:

$sites = Get-SPOSite -Filter { Url -like '*/sites*' } -Limit All
Johan M
Influencer
Posts: 10
Liked: 3 times
Joined: Mar 03, 2022 2:34 pm
Full Name: Johan
Location: Denmark
Contact:

Re: PowerShell commands for Sharepoint web parts warning

Post by Johan M »

Hi Mike Franz

As far as I know, there is no way to suppress these warnings.
You can always enable custom scripting for 1 run and then disable it again
Veeam only has to see the web parts 1 time.
Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests