I'm calling xcp in a powershell script and i would like to capture exit code and the total files copied and\or scanned.
PS md $($account.newhome)
PS C:\netapp\xcp\xcp.exe copy $account.homedirectory $account.newhome
Below is an example of the last 5 lines output to screen:
57,262 scanned, 0 errors, 0 skipped, 57,259 copied, 34.1GiB (0/s), 9m50s
57,262 scanned, 0 errors, 0 skipped, 57,259 copied, 34.1GiB (0/s), 9m55s
57,262 scanned, 0 errors, 0 skipped, 57,261 copied, 36.9GiB (63.1MiB/s), 9m59s
Sending statistics...
Error sending statistics