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.
Meh. Unfortunately you're not actually running a PowerShell command, so you're just getting text. I'd suggest piping it to Select-String and selecing on something like "Processing mailbox" as your pattern. PipeÂ that to Measure-Object and it should count the matches.