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?

Thuyavan GanesanPosted Apr 11, 2019, 11:30 AM
Export.ps1
[code language=”powershell”]
[CmdletBinding(SupportsShouldProcess = $true)]
param (
$Url,
$ClientId,
$ClientSecret,
$WFDefinitionName ..... ...............
Thivagar SegarPosted Apr 1, 2019, 10:33 AM
Raghavendar SwaminathanPosted Apr 1, 2019, 2:25 AM