SPTree To PortalInstruction

This script traverses a SharePoint site collection hierarchy turning it into an xml tree.
It can be used to recreate a site structure using the Instruction Framework.

How to use

You can run this instruction in your SharePoint environment by running the Instruction Workbench: SPTreeToPortalInstruction Sample.

Demo:
From Instructions

Code