Home All Other Feature Requests and Ideas
We appreciate you taking the time to vote and add your suggestions to make our products awesome! Your request will be submitted to the community for review and inclusion into the backlog.

We recommend reviewing what is submitted before posting, in case your idea has already been submitted by another community member. If it has been submitted, vote for that existing feature request (by clicking the up arrow) to increase its opportunity of being added to Cireson solutions.

For more information around feature requests in the Cireson Community click here.

PowerShell Activity - allow user-defined strings to be mapped to script parameters

Leigh_KildayLeigh_Kilday Member Ninja IT Monkey ✭✭✭✭
For standard Runbook activities, I can enter my own string into the parameter mapping if I don't want to map an object property. I would like to see this added to CPAs.

With this feature, I could make my PowerShell scripts more dynamic, and use a constant in my SR templates to define which action the script should take.

For example, I have a script to add a user as a reviewer to a specified RA.
Parameters include:
  • ActivityGUID (Required)
  • ApproverType [Manager/ServiceOwner/FreeText/RelatedCI] (Required)
  • FreeTextUserName (If ApproverType is FreeText)
  • FreeTextDomain (If ApproverType is FreeText)
The only difference in how the script works between ApproverTypes is where it gets the User(s) from.

Instead, I have to create four separate scripts in SCSM, one for each ApproverType, because I cannot tell the template which one to use.
12 votes

Submitted · Last Updated

Comments

  • Leigh_KildayLeigh_Kilday Member Ninja IT Monkey ✭✭✭✭
    I got a bit further today and discovered that I cannot map a user input to the script parameters either. I'd like this option as well please.
  • Geoff_RossGeoff_Ross Cireson Consultant O.G.
    Yup, upvoted.
    Workaround I have used is to extend the PowerShell Activity class with String 1 etc or a JSON blob property and then grab that once inside the PowerShell.

    So you would just pass in Activity ID using the current params functionality and then in the code grab the ID, grab the object with Get-SCSMObject -Id and then grab the properties and go from there.

    It works well but is long winded.

    Geoff
  • Peter_SettlePeter_Settle Customer Advanced IT Monkey ✭✭✭
    UpVoted,
Sign In or Register to comment.