I'm working on a PS script that will allow a user to paste a bunch of emails on the command line, then the script will parse each one out and run another function on them.
I've looked around for a solution as well as played around in VS Code, but nothing seems to work how I would like it.
The format of the pasted emails by the user will be as follows, copied from a txt file:
email@example.com firstname.lastname@example.org email@example.com
Each email separated by a newline.
Using Read-Host, if I paste multiple lines, it just takes the first line, runs whatever function I have on it, then errors out on the next lines.
Essentially I'd like input/output to look like this:
Paste emails: firstname.lastname@example.org email@example.com firstname.lastname@example.org Operation was performed on email email@example.com Operation was performed on email firstname.lastname@example.org Operation was performed on email email@example.com
Any help would be much appreciated. Thank you!