Home - Blogs - Orchestrator (Opalis) - “Run .Net Script” Activity - The All-Purpose Weapon
Wednesday, 11 July 2012 14:32

“Run .Net Script” Activity - The All-Purpose Weapon

Rate this item
(0 votes)

Mittwoch, 11. Juli 2012 Stefan Horz

Yes, there’s a rich set of Standard Activities in System Center 2012 Orchestrator, 73 in fact!
And yes, there are many Integration Packs available for Orchestrator right now which will enrich Orchestrator with Activities for each product.
And yes, and more and more will come from Vendors and Communities.
…. But, sometimes there’s no Activity available for the specific challenge....

Recently I helped someone in Forum with the challenge “Removing a Carriage Return after published data”.
This cannot be done with the built-in Data Manipulating Functions and we found no Activity for this.
But it can be solved with Powershell:
$str1 = "{Pure Output from "Run Program"}"
$return = $str1.Replace("`r`n", "")

So, we used the “Run .Net Script” Activity with the Powershell-Option for this.


specified the $Return-Variable as a new Published Data

RunDotNetPowershell PublishedData

and … that’s all :-)
The example Runbook is still available here http://sdrv.ms/MAR6i8

Of course, you can use the Run .Net Script” Activity to call Powershell Modules from Vendors if there's no Orchestrator Activity available right now. In the example below we Add NFS export permissions for a NetApp.


Read more

Leave a comment