running a one liner to remove enterprise vault from a number of mailboxes, it runs successfully and shows results on screen and to a text file. I would simply like to have a total at the bottom of the results indicating how many were completed, I’ve tried various ways to accomplish this and at best it came back with 10 items completed but actually there were only 3 items completed.
D:\PROGRA~1\ENTERP~1\evpm.exe -e Server1 -m EVServer1 -f D:\PROGRA~1\ENTERP~1\zap.ini | tee-object -filepath “D:\PROGRA~1\ENTERP~1\zap-log$(get-date -f yyyy-MM-dd)-Server1.txt” | Write-Host
Here’s the screen output:
Creating privileged MAPI session …
Parsing input file: D:\PROGRA~1\ENTERP~1\zap.ini
Processing input file
Processing mailbox: /o=Test/ou=Exchange Administrative Group (Test)/cn=Recipients/cn=TestMBX1
Processing mailbox: /o=Test/ou=Exchange Administrative Group (Test)/cn=Recipients/cn=TestMBX2
Processing mailbox: /o=Test/ou=Exchange Administrative Group (Test)/cn=Recipients/cn=TestMBX3
What I’m trying to accomplish is to have “3 total mailboxes completed” at the bottom of the above output.