Share via

SharePoint PowerShell giving an error while creating multipile sites

sns 9,251 Reputation points
2022-01-28T09:30:22.153+00:00

SharePoint PowerShell giving an error while creating multiple sites at a time.
Not sure what is missing in the below script. Please help
169416-creatingmulitiplesitesgivinganerror.png

Microsoft 365 and Office | SharePoint | For business | Windows
0 comments No comments

Answer accepted by question author

Allen Xu_MSFT 13,896 Reputation points
2022-01-31T01:47:18.533+00:00

Hi @sns ,

Modify $siteURL = "https://contoso.sharepoint.com/" + "$site" to $siteURL = "https://contoso.sharepoint.com/sites/" + "$site" in your script, then the script will run successfully.
169667-image.png

----------

If the answer is helpful, please click "Accept Answer" and kindly upvote it. If you have extra questions about this answer, please click "Comment".
Note: Please follow the steps in our documentation to enable e-mail notifications if you want to receive the related email notification for this thread.

Was this answer helpful?


0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as 'Accepted' by the question author and 'Recommended' by moderators, which helps users know the answer solved the author's problem.