Many of my SharePoint requirements recently involve moving content around or retro-fitting metadata from legacy systems. Mini-migrations might be the term I'm looking for there.
I have a migration tool which is good for bulk movement of content e.g. from File Shares into SharePoint. The issue is that it's not flexible enough to place content from the same source into different libraries or folders based on metadata, or fill in metadata from legacy systems.
This is where I turned to Powershell. Unfortunately the community scripts I found tended to be unreliable. For example I found one promising script that recurses through libraries to copy the content from one location to another. However it was very slow, and inexplicably missed some items. (Tried to debug it, but never found out why the files were missed). To cut a long story short I created my own entirely different approach which I've not used for many months. It's reliable and performant. I tend to bulk move content into a staging library, then 'Export to Excel' the IDs and other metadata from that staging lib, fill in extra properties and then use the script to put content and metadata into its final home.
The key to it is that rather than use recursion I get items by ID; $sList.GetItemById This performs really well, and dispenses with looping through a library structure.
The other key command in the script is Import-CSV. This allows me to tee up my metadata in a spreadsheet which my script will be able to use when setting item properties.
To get item ID I make sure the ID column is in a given view then export to excel. This base spreadsheet is then embellished with extra metadata and perhaps target folder ID (GetItemById works for folders or Docsets as well as items!).
The example script is below. I'm not holding it up as a masterpiece of Powershell, I'm no powershell maven. However it could prove valuable in your SharePoint toolkit.
To use it, you need to provide a CSV file with a source item ID, and whatever other metadata is needed. My file might look like this (though thousands of rows are fine);
Here's the script;
Subscribe to Cloud with a Sunny Outlook
Get the latest posts delivered right to your inbox