$syncEngine = New-Object SyncToy.SyncEngine($engineConfig)īut unfortunately the last line causes PowerShell to hang. While($sr.BaseStream.Position -lt $sr.BaseStream.Length) $seConfig = $bf.Deserialize($sr.BaseStream) $sr = New-Object IO.StreamReader($syncToyEngineConfigPath) $syncToyEngineConfigPath = "$env:LOCALAPPDATA\Microsoft\SyncToy\2.0\SyncToyDirPairs.bin" $syncToyEnginePath = Resolve-Path 'c:\Program Files*\SyncToy 2.1\SyncToyEngine.dll' SyncToy(圆4) needs to be run via PowerShell 圆4):
Considering that I would have setup already a folder pairing called ‘Test’ using the GUI, the following code should initiate the sync operation (it’s important to use the correct version of PowerShell to test this (i.e. NET assembly that comes with the SyncToy installation.