I am creating a reporting tool for O365 using PS. My current issue is when grabbing any existing proxy adresses for a user I get the following data.
smtp:1stline@hatchellwood.onmicrosoft.com smtp:1stline@hatchell.com SMTP:1stline@hatchellwood.com SIP:1stline@hatchellwood.com SPO:SPO_024de2bf-d843-48e0-938d-fb6cfa8dcdbc@SPO_1fef7b7b-eef2-4533-b45e-f7f842c9f6a7
I need to take the data only preceded by 'smpt' and remove the rest. I can't use the substring function due to the length of the substrings being random. Does anyone have a suggestion on how to approach this?
Much thanks.