Service Manager Task ile Orchestrator Runbook Çalıştırmak

Service Manager, Task özelliği ile harici bir komutun çalıştırılmasına ve Work Item’lar üzerinde işlem yapılmasına olanak tanır. PowerShell komutları kolaylıkla çalıştırılabildiği gibi Orchestartor Runbook’lar da Service Manager’da Task’lar yardımı ile tetiklenebilmektedir.

Aşağıdaki linten Orchestrator Remote Tools 2.51 indiriyoruz. http://orchestrator.codeplex.com/releases/view/76983
Service Manager Management sunucusunda bir paylaşım yaratarak indirdiğimiz paketteki 3 programı buraya kopyalıyoruz. Şimdi paylaşımımızda aşağıdaki gibi 3 bileşenin olması gerekiyor.

Şimdi yapmamız gereken ilk şey ORTUIGenerator.exe bileşenini çalıştırmak. Bu bileşen tüm Runbook’ları tespit ederek ve bunlar için ayrı template’ler yaratmamıza olanak sağlar. Bileşeni ilk defa çalıştırınca aşağıdaki pop-up pencere çıkar. Ok deyip devam ediyoruz.

Açılan yeni konfigürasyon penceresinde Orchestrator sunucumuzun adını yazmamız, veritabanını seçmemiz ve ayrıca console sunucumuzun da adını belirtmemiz gerekmektedir. Orchestrator sunucu adını yazdığımızda veritabanına ulaşamadığına dair bir mesaj alınmakta.

Bu yetkisel problemi aşmak için Orchestrator Service hesabı ile ORTUIGenerator.exe bileşenini tekrar çalıştırıyoruz. Bu sefer hata almadık. Orchestrator veritabanını ve Console Server bilgilerini de belirtiyoruz.

Yukardaki işlem tamamlanınca paylaşıma Config.xml adında bir dosyanın oluşturulduğunu görüyoruz. Yukardaki adımda belirttiğimiz bilgiler XML olarak oluşturulmuş oldu.

Açılan yeni pencerede artık Runbook’larımızı görebiliyoruz. Burada sadece Initialize Data aktivitesinin olduğu Runbook’ların tespit edildiğini görüyoruz. Task olarak çalıştıracağımız Runbook’u seçerek aşağıda “Get details for selected runbook” seçeneğini seçiyoruz ve “Create Runbook Launcher configiguration file” butonuna basarak policy_template.xml dosyasının oluşmasını sağlıyoruz. Artık Task oluşturma işlemine geçebiliriz.

Paylaşım dosyamızın son durumu aşağıdaki gibi.

Service Manager konsolda Library/Tasks/Create Task seçerek Task penceresini açıyoruz. Target class olarak Incident seçiyoruz. Categories bölümünden Incident Management Folder Tasks işaretliyoruz. Command Line bölümünde ise aşağıdaki parametreleri giriyoruz.

Full path to command: \\SCSM\SCSMShare\ORTRunbookLauncherCLI.exe
Insert Property: [code]/IncidentID=$Context/Property[Type=’WorkItem!System.WorkItem’]/Id$[/code] (Kullandığımız Runbook hangi parametreye ihtiyaç duyuyorsa burada onu ekliyoruz)
Working directory: \\SCSM\SCSMShare\

Task’ımız oluştuğuna göre artık test edebiliriz. Görüldüğü gibi başarıyla Task tamamlandı.

Related Posts

Orchestrator 2019 Upgrade

In this post, I will demonstrate System Center Orchestrator upgrade from 1807 to 2019. Back up the Orchestrator database. Backup all Runbooks (Right click on Runbooks folder…

Cireson Self Service Portal Database Migration

If you are planning to move the Service Manager database, you should also need to move the Cireson Service Desk Portal to the same instance. Stop the…

Service Manager Reporting Server Database Migration

In the previous post, I explained the steps of moving the Service Manager Data Warehouse databases to another SQL instance. In this post, I will share the…

Service Manager Data Warehouse Database Migration

Microsoft has documented in details how to move Service Manager Data Warehouse databases to another SQL instance. Do not attempt to move the Reporting Services database in…

SQL Upgrade of Orchestrator Server

In this post, I will demonstrate the steps for in-place upgrade of the SQL server version of System Center Orchestrator from 2016 to 2019. Orchestrator Version: 2019…

In-place OS Upgrade of Service Manager Data Warehouse

In this post, I will show the steps for in-place upgrade of Service Manager Data Warehouse management server (2019) OS from Microsoft Server 2016 to 2019. The…