0 votes

Hello!

some of our users have multiple email addresses and also have different variations of their name and perhaps their assistants name within the SMTP addresses.
for instance bob cook has the following emails: bcook@abc.com, cookb@abc.com, bcook@domain.com, bobcook@abc.com, tmarie@abc.com.

I've created a task that says "if the 'email proxy addresses' property contains '@abc.com', then
modify mailbox setting for the user: modify email addresses (remove 'smtp:%mailnickname%@abc.com')

which obviously works great if the mailnickname matches...but not certain how to remove the others.

Please let me know how I can remove all instances of email addresses that contain @abc.com from their SMTP.

Thanks in advance!

by (1.7k points)
0

can someone pls reply?

I hope my subject isn't confusing

1 Answer

0 votes
by (216k points)
selected by
Best answer

Hello,

To do this, you will need to use a PowerShell script. Have a look at the following script from our Script Repository that will do the job: Remove values of a multivalued property using regular expressions.

Parameters that you need to specify in the script:

  1. $property: "proxyAddresses";
  2. $regex: "smtp:\w+@abc\.com"

To add the script to your Scheduled Task, use the Run a program or PowerShell script action.

0

thanks!

just sent you something else.
it seems to remove all smtp addresses even ones that do not mention abc.com.
we only want to get rid of abc.com and nothing else.

0

any luck?

0

hi-- just checking in to see if theres a reason the script removes all addresses and not the one specified.

thanks

0

Hello,

We've forwarded all the available information to our script guys. They are checking the script, but no luck so far. We'll update you as soon as they come up with something.

0

ok, thanks

Related questions

0 votes
1 answer

Hallo @All, I'm working in an cloud environment with many tenants and every tenat has the same organizational unit structure. Now I want to add a security rule that deny access to ... *,DC=contoso,dc=msft,dc=com I hope someone has a hint for me. Thanks Arne

asked Oct 26, 2015 by ATiedemann (360 points)
0 votes
1 answer

As part of business rules etc we are able to add\remove accounts to groups. It would be nice if this feature could be extended to allow for wildcard ... multiple groups that meet the matching condition (without resorting to PowerShell script actions). Thanks

asked Aug 5, 2014 by firegoblin (1.6k points)
0 votes
1 answer

We are using the below snippet to grab the email of a single custom attribute object. Can I get guidance on the best way to modify this to get all the emails of each ... "The user specified in parameter 'MyParameter' has no email address. ", "Information") }

asked 2 days ago by msheppard (660 points)
0 votes
1 answer

We are wanting to display all values entered into a multi value text attribute in an email sent by Adaxes. What we've found is that only the first entry into the array ... Entry" Is there a way to reference the variable so that it displays all entries? Thanks

asked Dec 12 by msheppard (660 points)
0 votes
1 answer

I see the script for generating a report of users enrolled, but what I'd like to do is run a script that can populate a user attribute with Yes/No or True/False if they are or are not enrolled. Is there an existing script that accomplishes this? Thanks

asked Nov 19 by msheppard (660 points)
3,589 questions
3,278 answers
8,303 comments
548,130 users