Essentials may run with PowerShell asynchronously depending on the specific operating system (OS) configuration.
Using the java launcher below solves this problem and the script will execute synchronously:
& "$MetaVisPath\jre\bin\java.exe" -jar $MetaVisPath\plugins\org.eclipse.equinox.launcher_1.0.100.v20080509-1800.jar -cmd
See the below for an example in the context of a PowerShell script:
## Source site URL $SrcWeb = "http://sp2007/sites/team" ## Target site URL $TrgWeb = "http://sp2010/sites/root" ## Source list name $SrcList = "Specifications" ## Target list name $TrgList = "Specs" ## User name $User = "contoso\applebee" ## Password $Pwd = "1" ## Log File $Log = "C:\MyScript\log.xml" ## Go! & "$MetaVisPath\jre\bin\java.exe" -jar $MetaVisPath\plugins\org.eclipse.equinox.launcher_1.0.100.v20080509-1800.jar -cmd copyitems -srcsite $SrcWeb -srclist $SrcList -trgtsite $TrgWeb -trgtlist $TrgList -srcuser $User -srcpass $Pwd -trgtuser $User -trgtpass $Pwd -overwritebehavior dont_copy -log $Log -noSplash >output.txt 2>&1
As you can see it is the last line in the script that actually does all the work by invoking the "copyitems" command for the source and target libraries. If you are familiar with classic Windows shell batch mode, you will recognize the last part, which redirects standard console output and errors to output.txt.
Just change the values in the script to ones that match your setup and save the script as a PS1 file. When the script completes, you can examine the log file in the application (View > Log Viewer > Load). The output.txt contains a detailed progress log that may be useful for troubleshooting.
Note: It is recommend to close the Essentials console prior to running any scripts and to avoid running multiple PowerShell scripts in different windows.
© ALL RIGHTS RESERVED. Feedback Terms of Use Privacy Cookie Preference Center