Link to home
Start Free TrialLog in
Avatar of c_may
c_may

asked on

Error trying to run script to enable the BlockDownloadOfAllFilesForGuests setting in Sharepoint Online Management Shell

I am having trouble getting the BlockDownloadOfAllFilesForGuests setting set for my Sharepoint/Onedrive account.  The feature is detailed here: https://social.technet.microsoft.com/wiki/contents/articles/39497.onedrive-for-business-sharing-settings-with-powershell.aspx?Redirected=true#Block_Download

I am using Sharepoint Online Management Shell version 16.0.8316.0.

I have downloaded and installed the latest COM  from here: https://www.microsoft.com/en-us/download/details.aspx?id=42038   
using file sharepointclientcomponents_16-6906-1200_x64-en-us.msi

After downloading the script from this page, https://gallery.technet.microsoft.com/office/Block-of-all-files-for-2ad7a0db, and following its instructions I am getting the error below:

Exception calling "ExecuteQuery" with "0" argument(s): "Updating this tenant property is currently disabled."
At C:\BlockDownloadOfAllFilesForGuests.ps1:25 char:3
+   $ctx.ExecuteQuery()
+   ~~~~~~~~~~~~~~~~~~~
    + CategoryInfo          : NotSpecified: (:) [], MethodInvocationException
    + FullyQualifiedErrorId : ServerException

Any help would be greatly appreciated.
ASKER CERTIFIED SOLUTION
Avatar of Piotr Strycharz
Piotr Strycharz
Flag of Poland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of c_may
c_may

ASKER

Seems that is the case as Microsoft support couldn't help either.  Thanks.