I’m using Microsoft’s Sharepoint Migration Tool (SPMT) and am looking to batch create JSON files in Powershell that I can import to SPMT.
While the JSONLINT validator site says it passes, SPMT says it’s not formatted correctly.
When saving a migration JSON file directly from SPMT, the JSON is formated like this (and can be imported back to SPMT):
{ "Tasks": [ { "SourcePath": "X:", "TargetPath": "https://my.sharepoint.com/personal/MyOneDrive", "TargetList": "Documents" } ] }{ "Tasks": { "SourcePath": "X:", "TargetPath": "https://usdagcc-my.sharepoint.com/personal/MyOneDrive", "TargetList": "Documents" } }$OnPremToOneDrive = @{ Tasks = [ORDERED]@{ SourcePath = "X:" TargetPath = "https://my.sharepoint.com/personal/MyOneDrive" TargetList = 'Documents' } #end Tasks } #end $OnPremToOneDrive ConvertTo-Json $OnPremToOneDrive -Depth 10