0

I am following the document here

and trying to block a site for unmanaged devices using the command below:

Set-SPOSite -Identity https://<SharePoint online URL>/sites/<name of site or OneDrive account> -ConditionalAccessPolicy BlockAccess

But I am getting following errors:

Set-SPOSite : Parameter set cannot be resolved using the specified named parameters. At line:1 char:1 + Set-SPOSite -Identity https://xxxxxx.sharepoint.com/sites/VerySecure -C ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : InvalidArgument: (:) [Set-SPOSite], ParameterBindingException + FullyQualifiedErrorId : AmbiguousParameterSet,Microsoft.Online.SharePoint.PowerShell.SetSite

Can anyone please help me.

1

2 Answers 2

0

I can run this command without error.

Install the latest version of SharePoint Online Management Shell as @Vladimir Herrlein suggests and then test again as a global administrator.

Connect-SPOService -Url https://<tenant>-admin.sharepoint.com -credential <admin account>

Set-SPOSite -Identity <siteURL> -ConditionalAccessPolicy BlockAccess
4
  • @Nlama Have you run the SharePoint Online Management Shell as Administrator? Commented Nov 4, 2019 at 9:37
  • yes, I am global administrator in my tenant
    – Nlama
    Commented Nov 4, 2019 at 9:50
  • @Nlama Is this global Administrator also a site collection Administrator? Maybe try another site URL and see the result. Commented Nov 5, 2019 at 6:27
  • None of the above solution works, still having an issue with this. Created a several ticket and Microsoft team is not help me to fix this issue. Anyone out there also having the same issue.
    – Nlama
    Commented Nov 12, 2019 at 18:28
0

Add -nowait to the end and the command will execute.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.