Home Orchestrator

Attach file to call from folder (folder watcher?)

David_JohnsenDavid_Johnsen Customer Advanced IT Monkey ✭✭✭

Sorry if this has been asked before, I couldn't find anything on here (and apologies it's not strictly Cireson related, so tell me to go away if I shouldn't post it here!).

Anyway...

We'd like to be able to save a file in to a folder on a server, that is then picked up (by powershell or orchestrator?) and attached to a SR or IR in SCSM/Cireson.


We'd like to be able to call the file IR123456.pdf and the script know that that file should be attached to IR123456.  

(Also for multiples we'd like to be able to call the file IR123456_2.pdf ​or something and it still know, but that isn't critical)


I guess the orchestrator job would need to poll the folder, to search for files, but would there be a way to put a shortcut in there for the team to double click when they need it (saving system resources).


I'm sure @Geoff_Ross has told me there is a way to achieve something like this previously, but I we hadn't pursued it until now.

Best Answers

Answers

  • Brett_MoffettBrett_Moffett Cireson PACE Super IT Monkey ✭✭✭✭✭
    Hi @David_Johnsen
    This forum is for anyone in the community to ask questions on anything System Center related, so no one is going to tell you to go away. :smile:

    You are absolutely right that this is possible to do.
    It could be done via Orchestrator or via PowerShell or a combination there of.

    If you wish to do this via a RunBook, then you could do it using a monitoring activity that could monitor a folder, or your could do it via a scheduled job that could run every x minutes\hours etc.
    In addition, you could create a task within the SCSM console that could call the Runbook from within Orchestrator to do a "Manual Sync" of the folder if you wanted to as well.

    It all depends on what you want to achieve with the solution and how complex it needs to be as to the length a detail of the solution.

    I'm happy to chat with you in more detail here about it if you like.

    Regards,
    @Brett_Moffett

  • David_JohnsenDavid_Johnsen Customer Advanced IT Monkey ✭✭✭
    OK that's great Thanks. 

    We literally just want to be able to save files to a folder which then automatically attaches the files to a (closed) IR/SR.

  • Brett_MoffettBrett_Moffett Cireson PACE Super IT Monkey ✭✭✭✭✭
    Do you want to use Orchestrator or PowerShell?
  • David_JohnsenDavid_Johnsen Customer Advanced IT Monkey ✭✭✭
    I'm not very experienced in either unfortunately, I have mostly used Orchestrator in the past.
    I'd be welcome to take your recommendation on it! :)
  • David_JohnsenDavid_Johnsen Customer Advanced IT Monkey ✭✭✭
    here is a quick example:

    This just monitors the folder listed for the files shown in the Filters.
    Then we can run some PowerShell code to make the magic happen of first enumerating the files (Working out what Work Item number it is for) then finding the Work Item and attaching the file to it.

    Finally, move the file to another location so it does not trigger any new workflows.

    Hope this helps
    OK that's great, are you aware of any resources available for the powershell scripting with Service Manager? Or is best just to use google/technet?

  • Brett_MoffettBrett_Moffett Cireson PACE Super IT Monkey ✭✭✭✭✭
    Your friendly Cireson Territory manager would be able to put you in touch with either Cireson Consulting or one of our partners who could assist you.

    Let me know if you would like me to get you in touch with our UK staff.
  • David_JohnsenDavid_Johnsen Customer Advanced IT Monkey ✭✭✭
    OK great, I'll get back to you as we have an alternative option of using the Outlook Console.
    But I've got a call open regarding that not working when Skype is installed. So I'll see if I get anywhere with a fix for that, and then take it from there.

    Thanks.
  • Brett_MoffettBrett_Moffett Cireson PACE Super IT Monkey ✭✭✭✭✭
    Splitting your runbooks up like this is a great way to write one runbook and use it multiple times throughout your environment. Now any time you need to save an attachment from a SR you can just call the second runbook.

    Nice work.
  • Geoff_RossGeoff_Ross Cireson Consultant O.G.
    Yes, very nice work, well done.
Sign In or Register to comment.