The CreatorCon Call for Content is officially open! Get started here.

Automating Distribution List (DL)

catchdini
Tera Expert

Hello All, We have an requirement to automate DL tasks such as creating a DL, updating a DL (add or remove users in a DL) and delete a DL. Can someone please share some inputs and the way to achieve this. I have enabled Orchestration plugin for this. Thanks in advance.

17 REPLIES 17

I tried with Add-ADGroupMember "${workflow.scratchpad.dlName}" "{workflow.scratchpad.users}" but still the same kind of error.


powershell.jpg



Here's the scratchpad


Scratchpad.jpg



Powershell Command.jpg


It looks like you missed a $ in the variable that error-ed. It should be:


Add-ADGroupMember "${workflow.scratchpad.dlName}" "${workflow.scratchpad.users}"



If you look at the ECC Queue input for this activity you can see the exact script (with variables resolved properly.. or not) that will run on the mid server in the payload XML. It helps a lot when troubleshooting these types of issues.


Thanks Robert for pointing that. I wasnt able to do anything for the last couple of days. I changed it now and it works like a charm. I have a run script activity to update the local record in ServiceNow. There's a table called u_distrubution_group and Im trying to update this whenever an user is added or removed. Everytime the request changes or updates in AD, not in the local table. Any idea why this could be failing?


Hi Catch, what kind of failure are you getting?


syap
Tera Contributor

Hello Catch,



Were you able to do the Automation? I have the same requirement to automate the creation of the DL and its members. Would you be able to provide some snippet of the code? I see you have the PowerShell Activity Workflow. Where do you set the login to the Exchange?