Workflow and ServiceDesk Community

 View Only
  • 1.  Exchange component to Forward Email

    Posted Mar 29, 2012 01:46 PM

    I'm looking at the new exchange components and would like to know if theres a component to forward a mailbox to another user.  We had this capability in Workflow 6.5 developed for us by Incendio Technologies.  The components are licensed to the server they're on so I wanted to use the new components in 7.2 to do the same. 



  • 2.  RE: Exchange component to Forward Email

    Posted Mar 29, 2012 02:48 PM

     

    We ran into an issue similar with needing some additional functionality out of the Exchange components outside of what was provided. We ended up using the Exchange Management Shell and using Workflow to dynamically create the powershell scripts to create and run everything. That's been months ago and since then I've gotten a little more familiar with Web Services which is another option. I haven't looked at Exchange's SDK but that would be a direction to go in.

     

    For this particular one you could use the "set-mailbox" cmdlet to do the work for you. So from a strictly command line perspective your command would be..

     

     

    set-mailbox old.user -ForwardingAddress new.user

    From the workflow perspective you would want to use a create text file component which would create your .ps1 file (equivalent of the batch file basically) and it would be populated with the necessary variables for your users.

    Then a write file component to write it to a temp location.

    and lastly an ExecuteProcess to call the powershell executable which calls the temp ps1 file you created earlier. Which would be something like..

     

     

    C:\WINDOWS\system32\WindowsPowerShell\v1.0\powershell.exe -psc "C:\Program Files\microsoft\exchange server\bin\exshell.psc1" -noe -file "c:\path\to\temp.ps1"


  • 3.  RE: Exchange component to Forward Email

    Posted Mar 30, 2012 10:35 AM

    yeah.. I thought about doing it that way.. I actually have a workflow to create PSTs for users on separation or as needed that I ended up using a power shell script with.  I found that I could do it with the Active Directory "Update User" component but I was testing it with a static field.  When I tried to use it in my production environment I couldn't figure out how to use a variable for the value.  It allows for a constant or dynamic mapping.