System Center Orchestrator SQL Query–Query failed Runbooks

For your routine Orchestrator Checks, it can be vefy useful to see all failed Runbooks in a period. Of course you can go to each Runbook, and check the Logs, but to be honest, this is not fun.

So, there is a SQL Query to help on this. At the end of the the Query, there is a number, which will control the Timespan of the Query, in our example we want all failed Runbooks from the last 300 Hours, change this to your needs.

SQL Query get failed Runbooks

use Orchestrator

Select Name, TimeStarted, TimeEnded, POLICYINSTANCES.Status
From [Microsoft.SystemCenter.Orchestrator.Runtime].Jobs AS Jobs
 where POLICYINSTANCES.Status != 'success' 
 and  TimeEnded > dateadd(HOUR, -300, getdate()) 
 order by Name

(Read more…)

System Center Orchestrator SQL Query–Get Parent Caller Runbook

In huge System Center Orchestrator Environments, it is usual to make a lot of Sub Runbooks, that will be called by more than one Parent Runbook.

For Example, you build a Runbook to add a User in a Group. This Runbook will definitely be used by different Parent Runbooks. And in this case, it can sometimes be useful to query all Runbooks, which are calling our “Add User to Group” Runbook.

So, without any longer explanation, here is the SQL Query, which need to be run against the Orchestrator DB.

Don’t forget to change the Name of the Runbook, you want to query, at the End of the Script, in our example the name is “1.1-AddUserToGroup”

(Read more…)

System Center Orchestrator SQL Query–Runbook Run Count

This will be a short Post, sometimes it can be helpful to get a List of Runbooks and the Count, on how many times the Runbook has been executed.

Maybe if you are looking for most executed Runbook in case of an Performance Issue or you just want to track your environment.

Get Runbook Execution Count from the last Month

use Orchestrator

select	Name, count(policies.UniqueID) as Count from Policies 
inner join POLICYINSTANCES on policies.UniqueID=POLICYINSTANCES.PolicyID 
group by name 
order by Count Desc


(Read more…)

System Center 2019 is here

System Center

System Center

Yesterday Microsoft announced System Center 2019 is generally available.

System Center 2019 is a long term servicing channel (LTSC) release which will be supported for 10 years.

System Center 2019 supports Windows Server 2019 across the board and enables deployment, management and monitoring of Windows Server 2019 at data center scale. The key capabilities of this release include:

(Read more…)

PowerShell BackupScript Version 1.4 released

I have updated my PowerShell Backup Script and want to provide you the new Release

I have added some New Feature, Staging Folder, Exclude Dirs, 7Zip Support and fixed some Bugs.

Please comment and rate the Script on TechNet

IMPORTANT, the Script is now on GitHub:

(Read more…)

Fix SCSM Console Issues

Some time it can happen, that your System Center Service Manager Console is not working like expected.
For example

  • Changes are not visualized in the Console
  • If you open an Element, the new Window is very small
  • Console won’t open
  • some other Problems

So, there are several ways to fix this Problems, please take a note, after some steps, it might be necessary to enter your SCSM Server Information once again, like on the fist startup.

Make sure, you close your Console before trying the next steps.

Clear Console Cache

that’s the easiest one, start your SCSM console with the /cache command, for example
„C:\Program Files\Microsoft System Center 2012 R2\Service Manager\Microsoft.EnterpriseManagement.ServiceManager.UI.Console.exe“ /cache

(Read more…)

How to Alert LaMetric Watch with PowerShell

I have made me a Christmas Present by myself, and ordered a LaMetric Watch a few days ago. If there is someone, who don’t know what this is, take a look here:

After some time, configuring and playing around, I got the idea to push Messages to the LaMetric Watch with PowerShell.

It took only a few minutes, reading the API Documentation and write some PowerShell Code, and it worked like a charm.

It took some more time, to write a nice looking PowerShell Code Smileand to write this Article to provide you this Information.

The complete PowerShell Script is available at the Microsoft TechNet Gallery, see the Link at the bottom.


Of course, you have to configure your LaMetric Watch and connect it to your Wi-Fi, I will not guide you through this steps Smile

We need the IP and the API Key, the IP should be an easy one, go to your DHCP Server and check the IP, or open the LaMetric APP on your Phone, Settings About, and Wi-Fi, there is your IP

The API Key can be found in the Developer Area at the LaMetric Web Page, in the Device Section:

See this Article for more Help if needed:

Replace the Information at the following Part in the Script

Settings and Script

The rest of the Script is straight forward, you have some settings, which are listed in the Script itself, if your interest in some more Details, take a look at the API Docs from LaMetric:




Michael Seidl aka Techguy

au2mator WEBCAST Recording – Self Service your IT with au2mator

I have done a Webcast a few days ago, on how to use au2mator Self Service Portal, here is the recording, enjoy.


Orchestrator SQL Query to get Runbook running-time

Lately, we had a Requirement, at one of our Customers, to alert someone, if a Runbook is longer running than 30 minutes. There is a way to write an Event Log if a Runbook is running longer than XX Minutes, but this has to be configured for each single Runbook, so that wasn’t a good Solution.

So I have created a small SQL Query for that, which I would like to present to you. feel Free to use.


The Script

DateDiff(second, ins.TimeStarted, GETUTCDATE()) as Totalseconds ,
DateDiff(second, ins.TimeStarted, GETUTCDATE()) / 3600 as Hours, 
(DateDiff(second, ins.TimeStarted, GETUTCDATE()) % 3600) / 60 as Minutes, 
DateDiff(second, ins.TimeStarted, GETUTCDATE()) % 60 as Seconds

inner join POLICIES on Ins.PolicyID=POLICIES.UniqueID

 where Ins.Status is null and Name not like '%-MON-%'
order by Totalseconds desc

The Result


Some Information

The SQL Script is excluding all Runbooks which contain “-MON-“, cause this are the Monitoring Runbooks, we don’t want to alert, cause they are running all the time.

We are calculating the totalseconds, and additionally the hours, minutes and seconds as a Result.


Michael Seidl aka Techguy

Altaro VM Backup for Hyper-V and VMware

logoIn this Post, i want to take a closer Look at one my Blog Sponsor. Altaro VM Backup is providing a high performance VM Backup Solution. Before we start with some Key Features, let me introduce Altaro VM Backup.

With Altaro VM Backup, you only need to Backup your VM’s, doesn’t matter if it is HyperV or VMware. You need to license only the amount of Hosts, not the amount of Cores. And the best, for 2 VM’s it is absolutely free.

Feature Highlight

Backup every 5 Minutes

With the newest Release, it will be possible to backup your VM’s up to every 5 Minutes. So will loos nearly no Data in Case of a Desaster.

Boot from Backup

Each Backup is only as good as the Restore time. With Altaro VM Backup you will be able to Boot your VM directly from your Backup Vault, without the a Recovery-time.

Support for Azure Cloud

Of course, also Altaro VM Backup is supporting the offsite Backup to the Azure Cloud. So your Backup is really secure and offsite with support for Azure Backup Vault.

And many more…

Of course, above i have only mentioned a few Features, just to name some more:

Augmented Inline Deduplication, vCenter and CSV Support, Backup with zero Downtime, Central Console, automated Tests and lot more.


As you know, i am a SCDPM Fanboy for a very long time, but some Features are definitely worth trying Altaro VM Backup.

You can download a 30-day trial of Altaro VM Backup. After 30 days, you’ll get forever free backup for 2 VMs