I am migrating subsites to a different site collection using Export-SPWeb and Import-SPWeb (basically promoting/upgrading the subsites to site collection). However, I am losing all OOTB workflows as well as SPD workflows via this means. The SPD workflows exists and can be seen via SharePoint Designer, but all associations with list/library are lost in the destination.
My ask to all SP experts here - Is there any way we can migrate the workflows via Powershell?


Raghavendar SwaminathanRank #788 · 2.9K reputationPosted Mar 31, 2019, 10:25 PM EDT
Thivagar SegarRank #636 · 3.8K reputationPosted Apr 1, 2019, 6:33 AM EDT
Thuyavan GanesanRank #1,328 · 1.3K reputationPosted Apr 11, 2019, 7:30 AM EDT
Export.ps1
[code language=”powershell”]
[CmdletBinding(SupportsShouldProcess = $true)]
param (
$Url,
$ClientId,
$ClientSecret,
$WFDefinitionName ..... ...............