Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Challenges
Certification
Contribute
Article
Blog
Video
Ebook
Interview Question
Collapse
Feed
Dashboard
Wallet
Learn
Achievements
Network
Rewards
SharpGPT
Premium
Contribute
Article
Blog
Video
Ebook
Interview Question
Register
Login
Creating new SharePoint website using Windows PowerShell
WhatsApp
Gowtham Rajamanickam
9y
3.6
k
0
1
25
Blog
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:
//gauti.sharepoint.com
$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.
How to Create a new SharePoint website using SharePoint CSOM API and Windows PowerShell
Up Next
Create List in SharePoint using PowerShell
Ebook Download
View all
Printing in C# Made Easy
Read by 22.3k people
Download Now!
Learn
View all
Membership not found