- 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:
-
- $creation = New-Object Microsoft.SharePoint.Client.WebCreationInformation
- $creation.Url = "TestWeb"
- $creation.Title = "TestWebName"
- $newWeb = context.Web.Webs.Add($creation)
-
- # Retrieve the new web information.
- Load-CSOMProperties -object $newWeb -propertyNames @("Title")
- $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.