Orchestrator not loading smlets in PowerShell session in runbook

Author by Nathan Lasnoski

I was working on an automation with Orchestrator where I was leveraging the Service Manager Powershell smlets and ran into an interesting error where the smlets loaded properly in the PowerShell session, but not from within Orchestrator.  I looked at the configuration and saw what appeared to be an appropriate set of code. This is the original code.  The interesting thing about the code is it works completely from a PowerShell command session, but does not work properly from the PowerShell session in Orchestrator. This is the error that resulted.  The error was logged when the PowerShell tried to execute the command, not when it tried to load the actual smlets.  The error was "'Get-SCSMObject' is not recognized as the name of a cmdlet, function..." I then changed the code to use a fully qualified name for the smlets, which then loaded properly.  I essentially put in the entire path of the smlets psd1 file, vs. just using the short name. For more information on using smlets wtih Orchestrator, check this out: http://www.concurrency.com/blog/scsm-notifications-through-orchestrator-and-smlets/   I hope this helps someone out!    Nathan Lasnoski


Nathan Lasnoski

Chief Technology Officer