Compartir a través de


Automation–Orchestrator Integration Pack for PowerShell Script Execution–Version 1.2!

Hello Readers/Viewers!

Remember back in January of this year when I published the Automation–Orchestrator Integration Pack for PowerShell Script Execution post over here on the Building Clouds Blog? It was a re-introduction of thecontent I originally posted many moons ago on my old Blog D’Joy TechNet Blog (I will not expect you to remember that far back!) ;)

Either way, an update to this Integration Pack has been a long time in the making. In fact when I posted about it earlier this year, I had some really great feedback (thank you Greg Bray!) on how to improve and add some really great functionality to something that has already been installed many, many times. I have now taken that feedback, plus one additional “feature” and am proud to release the Orchestrator Integration Pack for PowerShell Script Execution 1.2!

So, this blog post will be a short recap of what is already in the updated documentation (available in the new download) – but first…


…the Download!

The download includes the following (2) files:

  • ExecutePS_1.2.oip (System Center 2012 SP1 – Orchestrator Integration Pack)
  • Integration Pack for PowerShell Script Execution 1.2 - User Guide.docx (updated documentation)

Download the Orchestrator Integration Pack for PowerShell Script Execution 1.2 from TechNet Gallery here:

BC-DLButtonDark


What’s New in Version 1.2?

The following list outlines the three main updates for version 1.2 of the Orchestrator Integration Pack for PowerShell Script Execution.

  1. New IP Connection - Authentication Method - CredSSP
    For more information about CredSSP, please review the following:

  2. New IP Global Connection / Activity Functionality - Get Host Name from Activity
    This requirement came directly from comments/suggestions in the original blog post here: Automation–Orchestrator Integration Pack for PowerShell Script Execution

    IMPORTANT: Because the existing Global Configuration field for “Host Name” changed to “Host Name from Global Config”, existing configurations will need to be updated before their respective activities will function as expected.

  3. New IP Activity Execution Option - Execute Asynchronously
    While investigating Timeout Configuration for the IP, I came across yet another option for the execution of scripts within the runspace(s) created during exection. This option is now offered during design time (default is set to “False”, which imitates existing functionality pre-option). The options pertain to the following Methods:

NOTE: Each of the new features/enhancements are detailed within the updated documentation available in the new download.


System Requirements

  • System Center 2012 Orchestrator (SP1+)
  • System Center 2012 Orchestrator Integration Toolkit (SP1)
  • Microsoft .NET 3.0 Framework
  • PowerShell 2.0+
  • winrm quickconfig command executed on local and target machines where PS Scripts will be executed
  • Enable-WSManCredSSP for Client and Server roles as needed if CredSSP functionality is desired

Upgrading (from Version 1.1)

Via the Orchestrator Deployment Manager…

  1. Uninstall the existing Integration Pack (version 1.1) from any and all machines where it has been installed (both Runbook Designer and Runbook Server machines)
  2. Unregister the existing Integration Pack (version 1.1)
  3. Register the new Integration Pack (version 1.2 - ExecutePS_1.2.oip)
  4. Deploy/Install the new Integration Pack (version 1.2 - ExecutePS_1.2.oip) to any and all machines where it is needed (both Runbook Designer and Runbook Server machines)

Pre-System Center 2012 SP1 – Orchestrator Notes

As you likely know, a new version of the Orchestrator Integration Toolkit (OIT) shipped with SP1. This new Integration Pack was created with this new OIT, and likely will not be compatible with older versions of Orchestrator (due to Microsoft.SystemCenter.Orchestrator.Integration.dll changes).

If you will not be installing/using System Center 2012 SP1 Orchestrator and would like an older copy of the DLL for this IP that will work for older deployments, please find it here: https://sdrv.ms/10dEvfQ and reference the comments in the original blog post here: Automation–Orchestrator Integration Pack for PowerShell Script Execution


That’s it - thanks for checking it out!

And for more information, tips/tricks, and example solutions for Orchestrator, be sure to watch for future blog posts in the Automation Track!

enJOY!


Comments

  • Anonymous
    January 01, 2003
    Awesome! Keep up the great work!

  • Anonymous
    January 01, 2003
    The comment has been removed

  • Anonymous
    January 01, 2003
    The comment has been removed

  • Anonymous
    January 01, 2003
    The comment has been removed

  • Anonymous
    January 01, 2003
    very nice, can't wait to try it out!

  • Anonymous
    January 01, 2003
    @Sean - The only thing I can think of is that the commands are not actually executing. The IP relies 100% on PowerShell Remoting. Have you attempted to connect to the remote machine (that has not PS installed) via ISE, using "New Remote PowerShell Tab..." (Ctrl+Shift+R) - I am not even sure it would work against machines without PS installed. Your commands may simply be remote WMI commands? Either way, I never tested this IP against remote machines without PS installed.That said, you can put a $Error at the end of the script you are testing, to see if you get any more information from the Error Stream.In any case, if you want to run remote WMI commands, you may want to check out this post: http://blogs.technet.com/b/privatecloud/archive/2013/01/24/automation-orchestrator-integration-pack-for-windows-tasks.aspx

  • Anonymous
    October 24, 2013
    Does this IP solve any of the issues with running Powershell 3.0 + cmdlets in Orchestrator?  I am struggling to get Azure Powershell cmdlets to work correctly in Orchestrator through the "Run .Net Script" activity.  The Azure IP doesn't provide doesn't provide the control that I need.   I don't really understand what problem the "ExecutePS_1.2 IP solves.

  • Anonymous
    October 28, 2013
    The comment has been removed

  • Anonymous
    November 08, 2013
    Charles,  I have had GREAT experiences with this OIP. Thank you VERY much!  However, I am experiencing an issue where the Activity is returning success (When is should be returning warning/fail) and it is passing no results downstream to activities connected with an arrow. I have tried many different variations of settings and have had no luck. I set a Platform Notification to subscribe to Activity Status, Results, Results with Write-host and only the status is coming through in the notification.

  • Anonymous
    November 08, 2013
    @Dave - Thanks for your kind words! :) The issue may be that the activity is actually "completing", failure or not. Best option with this IP is to leverage $error (just put it at the end of the script). Then you can evaluate based on anything in there that may actually be causing the failure. Are you leveraging any try...catch...throw logic? Either way, first step is to see what is wrong, use $error to dig a bit deeper, and hopefully it will be easy to move forward. -Charles

  • Anonymous
    November 08, 2013
    Charles, Here is the PS code: [string]$pass='d.T.~Ed/{73A5A849-CCA6-405A-8D80-AD499E05644C}.SendOpalisEvent.Summaryd.T.~Ed/' [string]$errorstring=""; [bool]$badpass=$false; [bool]$check=$false; If ($pass.length -lt 8)  {   $errorstring+="Password is not long enough. ";   $badpass=$true   } $check=$pass -match "[0-9]"; if ($check -ne $true)  {   $errorstring+="Password does not contain a number. ";   $badpass=$true   } $check=$pass -match "[a-z]"; if ($check -ne $true)  {   $errorstring+="Password does not contain a lower case letter. ";   $badpass=$true   } $check=$pass -match "[A-Z]"; if ($check -ne $true)  {   $errorstring+="Password does not contain a upper case letter. ";   $badpass=$true   } $check=$pass -match "[^x20_!#$&()*,./:?@{}'-+=]"; if ($check -ne $true)  {   $errorstring+="Password does not contain a special character. ";   $badpass=$true   } if ($badpass -eq $true)   {   $errorstring+="nError Loge:n";   $errorstring+=$error | out-string;   write-host ("Error: $errorstring");   write-error ("Error: $errorstring") -erroraction stop   } else   {   $errorstring="Password is Valid";   write-host("Status: $errorstring");   return $errorstring   } Right now the data being fed too it upstream is "1234567" which should trigger the write-error sequence. I am subscribing to Results, Results with Write-host, Data Output and count and all come back blank. Activity Status comes back as success, but no other published data is coming through. Any ideas? Dave M

  • Anonymous
    November 08, 2013
    The comment has been removed

  • Anonymous
    November 11, 2013
    @Charles You are a GENIUS! BTW, 0x27 works in its place. Thanks again for making this and thank you so much for fixing this issue. Dave M

  • Anonymous
    December 13, 2013
    The comment has been removed

  • Anonymous
    December 16, 2013
    The comment has been removed

  • Anonymous
    March 06, 2014
    The comment has been removed

  • Anonymous
    July 31, 2014
    The comment has been removed