Google

24 February 2014

Create SharePoint Containers With PowerShell Script

PowerShell iconIn my series of tutorials built on my session at SharePoint Saturday in Stockholm I have now published the last article about file migration into SharePoint in the kalmstrom.com Tips section.

In the Sharepoint Saturday session I shared my experience of planning the move of a huge number of files into SharePoint. This task begun with a  fileshare inventory, and after that old Office files were converted into modern formats.

These two steps have already been described in blog posts and Tips articles, as well as the creation of Site collections with a PowerShell script. Now it is time for the final step, the actual file transfer from folders to SharePoint.

What kind of SharePoint containers?SharePoint 2013 logo
SharePoint can have a folder system in a document library that resembles the old fileshare. However, SharePoint is a modern platform that gives more and better possibilities, so we should try to think differently and not get stuck in old habits.

Avoid folders
The immidiate answer to the question on how to get files from a folder into SharePoint is perhaps to drag and drop or upload them to different folders in a document library. This is a tedious work if you have many files, but it is also a bad solution even for fewer files. The navigation becomes more difficult the more folders and subfolders you add, and the SharePoint search will work badly.

Better solutions
SharePoint gives better options than folders. You can use site collections or subsites, or a number of document libraries. In any case you should use tags and metadata. It requires some end user training and an agreement on what tags are needed, but in the long run it will make it much easier to find information.

PowerShell scripts
In the article about SharePoint containers in the kalmstrom.com Tips section I am sharing two PowerShell scripts. One is for the creation of different SharePoint containers, specified in a CSV file, and the other one is used to transfer the files into the containers.

You are welcome to download the scripts and use them with your own material. In the demo below I go through the two scripts and explain how the are written. The Tips article also gives a step by step instruction on the process.


By Peter Kalmstrom
CEO and Systems Designer
kalmstrom.com Business Solutions

No comments:

Post a Comment