https://github.com/DeploymentResearch/DRFiles/blob/master/Scripts/Export-WindowsServer2019WIMfromISO.ps1 Line 12 should be $WIMFolder instead of $WIMPath which is never defined.