Link to home
Start Free TrialLog in
Avatar of roy_batty
roy_battyFlag for United Kingdom of Great Britain and Northern Ireland

asked on

Create Sharepoint Online libraries using Powershell

I am trying to create around 100 libraries in a Office 365 Team Site.

I have been following this guide but have got a bit stuck.

I have got the Client-side SharePoint PowerShell working and can create individual libraries by running

Add-DocumentLibrary -listTitle Accounts

Open in new window

for example which creates a "Accounts" library.

My question is how do I tell it to use the .csv of the folder names to create all 100 libraries in one go.

I tried pasting this into powershell and it creates some libraries but misses the ones which have a spacce in the library name

Add-DocumentLibrary -listTitle Historic Info
Add-DocumentLibrary -listTitle Home Group Presentations
Add-DocumentLibrary -listTitle Independant Vetcare
Add-DocumentLibrary -listTitle Insurance
Add-DocumentLibrary -listTitle Interview Confirmation Documents
Add-DocumentLibrary -listTitle Invoices

Open in new window

Can someone advice me please
Avatar of Rainer Jeschor
Rainer Jeschor
Flag of Germany image

Link to home
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of roy_batty


That did it. Many thanks