Can you please provide a sample on how to use the JobIds to generate a log for a particular site migration job?
Using the following API call from custom PowerShell scripts to export migration log to shared folder:
Export-JobHistory -SqlCeDbFilePath <string> [-OutputDirectoryPath <string>] [-OutputFileName <string>] [-Overwrite <bool>] [-JobIds <IEnumerable[string]>] [<CommonParameters>]
Problem is without using "-JobIds", it is generating excel with all the migration log. Our requirement is to generate log for each site migration.
There are a few ways to do this, but the end result is that you need to switch "$jobId" to something that is implementing the "IEnumerable". Invoking the constructor of the class the way they are is not really the best.
$jobid = new-object System.Collections.Generic.List[String] $jobid.Add("5bd5eb6f-c4e7-4cbb-a7c2-ed02eebaf681") Export-JobHistory -SqlCeDbFilePath $cfg.env.MetalogixJobFilePath -OutputDirectoryPath "D:\PMU" -OutputFileName "5bd5eb6f-c4e7-4cbb-a7c2-ed02eebaf681.xlsx" -JobIds $jobid.ToArray()?
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy