Create Folder Hierarchies for SharePoint Lists and Libraries using Powershell

A small Powershell snippet which will create folder hierarchies within SharePoint lists and libraries


$w = Get-SPWeb "http://team.pdogs.local"
$sa = $w.Lists["Site Assets"]

$f = EnsureListFolderTree $w $sa "meetings/q1/q1-1"
$f = EnsureListFolderTree $w $sa "meetings/q1/q1-2"
$f = EnsureListFolderTree $w $sa "meetings/q2/q2-1"
$f = EnsureListFolderTree $w $sa "meetings/q2/q2-2"

Published by

Phil Harding

SharePoint Consultant, Developer, Father, Husband and Climber.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.