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

I'm trying to modify this report to only output results where employeeType equals the values below. It reports fine. I would also like to include where employeeType ... = "(&" + $filterUsers + $filterPasswordLastSet + $customAttribute + $enabledUser + ")"

asked Mar 28 by tromanko (180 points)
0 votes
1 answer

Hello team, our users are created by HR system into AD and have the start date as string in extensionAttribute2 with a prefix (like "startdate_2024-01-02"). Sometimes the user ... "Employee" Do you have a script in place to achieve this? Thanks in advance.

asked Mar 26 by wintec01 (1.1k points)
0 votes
1 answer

I have made a deprovision custom command. I cannot change the attribute directReports, so was thinking - i could take the people in the directReports field of the manager ... (and its subordinates) that im running the deprovision custom command from. Any tips?

asked Mar 21 by EdgarsABG (50 points)
3,346 questions
3,047 answers
7,782 comments
544,988 users