Request Offering to create a new Request Offering via automation
This solution would require:
- A new MP
- A new template (based on an existing template?)
- A new RO with associated prompts
- Addition of the new RO to Catalog Groups
- Addition of the new RO to a SO (alternatively a new SO)
Best Answer
-
Geoff_Ross Cireson Consultant O.G.Hi Leigh,
Never done it but all of the above are possible via SMLets so it should be very doable via some PowerShell.
Building a Cireson ARO might be slightly trickier as not natively supported by SMlets but if you reverse engineer the XML format for the advanced configuration it might work.
Geoff2
Answers
Never done it but all of the above are possible via SMLets so it should be very doable via some PowerShell.
Building a Cireson ARO might be slightly trickier as not natively supported by SMlets but if you reverse engineer the XML format for the advanced configuration it might work.
Geoff
@Geoff_Ross, have you had specific experience with creating an RO?
I've been using the following and cannot get more than one prompt to pass through the New-SCSMRequestOfferingQuestion ForEach loop:
http://systemcenterme.com/create-request-offering-with-powershell-in-service-manager-2012/
The error is:
Method invocation failed because [SMLets.ROMapElement] does not contain a method named 'op_Addition'.
Edit: Nevermind. I transcribed a $ where it should have been @.
I'd love to see what your solution end sup to be here.
I'm sure there are plenty of people in our community that would love to see the solution you came up with and to share the PS Code if you can.
No problem @Brett_Moffett. The bulk of the code is coming from Jonathan Andersson's blog so most of the kudos goes to him.
So far I have a script that:
Still to do:
- Setting the RO image. I'm not too concerned with this one.
- We already have scripts to add ROs to a SO. I just have to add it to this script. For our own purposes we don't need to create a new SO, but if I get some time to build it I will.
- Enabling the new template in User Roles.
- Converting the script to a runbook.
- Creating the initial RO to kick all of this off in the first place.
Even as it is right now, it's so much faster to create a new RO. I wish we had this when we were building them for launch!It looks like those scripts are fleshed out a bit more here:
https://blogs.technet.microsoft.com/wincat/2013/03/04/automating-service-manager-service-request-catalog-deployment-through-powershell-and-csv-files/
I looked at this once before when I was new to SCSM and didn't think it was worth the effort for bulk-RO insertion.
Reviewing the above code, I still don't know how to create more than one entry in the Simple List answers, but it does have solutions for setting the RO image, creating the SO, and linking the RO and SO.
The error I mentioned before was because I had the native cmdlets loaded, but they were not necessary for the script.
Creating RO's and mapping fields is a massive pain in the ass in SCSM, because I'm not using Advanced Request Offering, I think ARO would save me some time.
Further development on the RO can occur later when the admin team has time.
I haven't had time to work on this further, but I believe it would pass testing based on our requirements.