I'm working with the delprof2 executable (https://helgeklein.com/free-tools/delprof2-user-profile-deletion-tool/, deletes user profiles) and incorporating it into a PS script. Everything works as expected, no problems, I've just run into a 'nice-to-have' that intrigues me.
When using the delprof2 /u option and having it delete profiles, it writes to the console a list of all the profiles it is ignoring, and then it writes:
Text
Deleting profile '\\computername\c$\users\username' ...
Text
... done.
What I'd like to do is to be able to suppress the first few lines (saving the data for the final returned object) and output the above two lines as they occur in real time. What I've tried is...