- Start your windows PowerShell on your computer.
- Right click and select Run as administrator option.
- Paste the below script on the PowerShell window and click the enter button.
- Check your SharePoint site Feature will activated successfully.
- $context = Connect-SPOSite https:
-
- # The SharePoint web at the URL.
- $web = $context.Web
-
- # Option 1: Let the API load what it wants to load
- # Retrieve all lists from the server.
-
- $context.Load($web.Lists)
-
- # Option 2: Load specific properties
- # Retrieve all lists from the server.
- # For each list, retrieve Title and Id.
-
- Load-CSOMProperties -parentObject $web -collectionObject $web.Lists -propertyNames @("Id", "Title") -parentPropertyName "Lists"
-
- # Execute query.
-
- $context.ExecuteQuery()
Run the script with the required administrator privilege. To verify that, Check the output window. Thanks for reading my blog.
Hope you have enjoyed this..