Authoring PowerShell Script SMA Troubleshooting

SMA Authoring Toolkit – Some Runbooks Are Not Showing Up

untitled

When you are creating runbooks in SMA (Service Management Automation) and you are using the SMA Authoring Toolkit available on PowerShell Gallery, you might have also have faced a very annoying bug. If you have a certain amount of runbooks in SMA and you are browsing through the runbook list in ISE you simply cannot find certain runbooks. Trying to refresh the list does not work at all.

image

If you open SMA to browse the runbook list you can see them all published and in a “healthy” state. So there is no reason not to show up.

After some discussions with MVP Michael “Miru” Rüefli he put me into the right direction. Some time ago, I had a similar issue with the SCSM-SMA connector from Cireson. I blogged about it, you can find the post here.

The SMA web service was limiting the number of entries that are returned by the request. Exactly this behavior is described in a MSDN article https://msdn.microsoft.com/en-us/library/dn688368.aspx. You need to update

To change the number of entries returned in a single request

  • On the computer running the Service Management Automation web service, select Start, then Administrative Tools, and then Internet Information Services (IIS) Manager.
  • Expand the computer, then Sites.
  • Select SMA.
  • In the /SMA Home pane, double-click Application Settings.
  • Double-click the type of collection that you want to change.
  • In the Value field, type the number of entries to return and click OK.

In IIS it looks like this, the default value is 100 and we increased it to 300 or whatever value you think is appropriate…

image

Restart the ISE console and re-connect to SMA, after this change all “missing” runbooks appeared.

Thanks to my fellow MVP MIchael Rüefli for helping to solve this issue.

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.