Documentation

{{docApp.title}}

{{docApp.description}}

How can we help?

{{docApp.searchError}}
{{product.name}}

Searching in {{docApp.searchFilterBySpecificBookTitle}}

{{docApp.searchResultFilteredItems.length}} results for: {{docApp.currentResultsSearchText}} in {{docApp.searchFilterBySpecificBookTitle}}
Search results have been limited. There are a total of {{docApp.searchResponse.totalResultsAvailable}} matches.

You have an odd number of " characters in your search terms - each one needs closing with a matching " character!

{{docApp.libraryHomeViewProduct.title || docApp.libraryHomeViewProduct.id}}

{{docApp.libraryHomeViewProduct.description}}

  1. {{book.title}}

{{group.title || group.id}}

{{group.description}}

  1. {{book.title}}

{{group.title}}

Creating a Package

Hornbill ITOM provides you with the ability to create your own user-defined packages, of which you can use to create IT Automations and enhance Runbooks processes. This guide will take you through the basics of creating the different types of packages that are available, publishing and executing them. Packages can be as simple operation such as executing an OS command or executable thru to the creation of a complex script.

Packages contain a number of operations that provide some functionality to be used within an IT Automation. In general, the operations contained within a package would relate in some form, i.e User Account Management (Create, Delete, Disable, Enable, etc.). However, it is completely up to yourself what operations are contained within a package. You could, for example, have a package called toolbox, which contains operations for User Management, TCP/IP Utilities, File Management etc. This would no doubt become a little confusing and difficult to manage in the long term.

Package operation command types:

  • Run an OS Command
  • Run a Windows Installer
  • Run a Windows Executable
  • Batch Script
  • Windows Powershell
  • Powershell Core
  • Linux Shell Script

Run a Command

  1. From the ITOM page select Package Creator
  2. Click the New Pacakge button
  3. Enter a Package name: TCP Utilities
  4. Set Target OS to Windows Universal
  5. Click Add Operation button
  6. Enter the following details:
    • Operation: Ping
    • Description: Ping a device using the parameters -n, host
    • Command Type: Run Command
    • Command: cmd /c ping.exe
    • Timeout(secs): 60
    • Options/Args: -n {param.count} {param.host}
  7. Click Add Parameter button
  8. Set the following attributes:
    • Required
    • Number
    • Parameter Name: count
    • Default value: 3
    • Hint: Number of echo requests to send.
  9. Click Add Parameter button
  10. Set the following attributes:
    • Required
    • string
    • Parameter Name: host
    • Hint: Target device hostname.
  11. Click Apply
  12. Click Baseline button
  13. Select Version 1 via the Drop Down Adjacent to the Baseline button
  14. Click Package and Install drop down, and select Package and Install

Executing the Package Operation

  1. Navigate to (Home > ITOM > Job Queue)
  2. Click Create New button, and select IT Automation Job
  3. Select Run Package: private:{instance-name} > General Purpose > TCP Utilities (Version 1)
  4. Click Apply
  5. Enter the following details:
    • Name: Ping Computer
    • Run Operation: ping
    • Site Target: Server |
    • Target Machine: Inventory |
    • Admin Credentials: Network Admin
  6. Click Create

Windows Installer Package

  1. From the ITOM page select Package Creator
  2. Click the New Package button
  3. Enter a Package name: Software Installer
  4. Set Target OS to Windows Universal
  5. Click Upload File button
  6. Select the following file: C:\ Documents\ITOM\Packages\Demo.msi
  7. Click on Package Info
  8. Click Add Operation button
  9. Enter the following details:
    • Operation: Install
    • Description: Install Windows application
    • Command Type: Windows Installer
    • Package: Demo.msi
    • Action: Install Software
  10. Click Add
  11. Click Add Operation button
  12. Enter the following details:
    • Operation: Uninstall
    • Description: Uninstall Windows application
    • Command Type: Windows Installer
    • Package: Demo.msi
    • Action: Uninstall Software
  13. Click Add
  14. Click Baseline button
  15. Select Version 1 via the Drop Down Adjacent to the Baseline button
  16. Click Package and Install drop down, and select Package and Install

Execute Installation Job

  1. Navigate to (Home > ITOM > Job Queue)
  2. Click Create New button, and select IT Automation Job
  3. Select Package: private:{instance-name} > General Purpose > Software Installer (Version 1)
  4. Click Apply
  5. Enter the following details:
    • Name: Software Installation
    • Run Operation: Install
    • Site Target: Server |
    • Target Machine: Inventory |
    • Admin Credentials: 'Network Admin
  6. Click Create
  7. Verify that the following software exists on the target:
    • Name: Generic Business Application
    • Publisher: Acme Software Ltd

Execute Uninstallation Job

  1. Navigate to (Home > ITOM > Job Queue)
  2. Click Create New button, and select IT Automation Job
  3. Select Package: private:{instance-name} > General Purpose > Software Installer (Version 1)
  4. Click Apply
  5. Enter the following details:
    • Name: Software Uninstallation
    • Run Operation: UniInstall
    • Site Target: Server |
    • Target Machine: Inventory |
    • Admin Credentials: Network Admin
  6. Click Create
  7. Verify that the following the software no longer exists on the target:
    • Name: Generic Business Application
    • Publisher: Acme Software Ltd

Windows Executable Package

  1. From the ITOM page select Package Creator
  2. Click the New Package NewPackageButton.png button
  3. Enter a Package name: Windows Executable
  4. Set Target OS to Windows Universal
  5. Click Upload File button
  6. Select the following file: C:\ Documents\ITOM\Packages\ShowHarry.exe
  7. Click on Package Info
  8. Click Add Operation button
  9. Enter the following details:
    • Operation: Show Harry
    • Description: Windows Executable - Show Harry.exe
    • Command Type: Windows Executable
    • Run File: ShowHarry.exe
  10. Click Add
  11. Click Baseline button
  12. Select Version 1 via the Drop Down Adjacent to the Baseline button
  13. Click Package and Install drop down, and select Package and Install

Execute Job

  1. Navigate to (Home > ITOM > Job Queue)
  2. Click Create New (+) button, and select IT Automation Job
  3. Select Run Package: private:{instance-name} > General Purpose > Windows Executable (Version 1)
  4. Click Apply
  5. Enter the following details:
    • Name: Windows Executable
    • Run Operation: Show Harry
    • Site Target: Server |
    • Target Machine: Inventory |
    • Admin Credentials: Network Admin
  6. Click Create

PowerShell Script Package

  1. From the ITOM page select Package Creator
  2. Click the New Package button
  3. Enter a Package name: Disk Information
  4. Set Target OS to Windows Universal
  5. Click the Add new File Button
  6. Enter filename as: diskinfo.ps1 and click Apply
  7. Click Add Operation button
  8. Enter the following details:
    • Operation: Get Details
    • Description: Information for a Selected Disk Drive
    • Command Type: Windows PowerShell
    • Set the Script to: diskinfo.ps1
    • Timeout(secs): 60

Input Parameters

  1. Click Add Parameter button
  2. Set the following attributes:
    • Required
    • Number
    • Parameter Name: Dirve
    • Default value: C
    • Hint: Enter the Drive Letter.

Output Parameters

  1. Click Add Parameter button
  2. Set the following attributes:
    • Required
    • string
    • Parameter Name: outcome
    • Click Add
  3. Add the following optional string output parameters:
    • Label
    • Size
    • FreeSpace
    • errors
  4. Click Apply

Add Script Content

  1. Click on the script driveinfo.ps1
  2. Enter the following code:
# Example PS ITOM Package Script
# Input Parameters
Param (
    [String]$Drive = "C"
)

# Operation Logic
try {
$volinfo = Get-Volume -DriveLetter $Drive -ErrorAction STOP
} catch {
    # Command failed exit with error mesage
    Write-Output "{{SISJobOutputParameterStart:outcome}}Fail{{SISJobOutputParameterEnd}}"
    Write-Output "{{SISJobOutputParameterStart:errors}}$_.Exception.message{{SISJobOutputParameterEnd}}"
    Exit 0
}

# Package Output Parameters
Write-Output "{{SISJobOutputParameterStart:Label}}$($volinfo.FileSystemLabel){{SISJobOutputParameterEnd}}"
Write-Output "{{SISJobOutputParameterStart:Size}}$($volinfo.Size){{SISJobOutputParameterEnd}}"
Write-Output "{{SISJobOutputParameterStart:FreeSpace}}$($volinfo.SizeRemaining){{SISJobOutputParameterEnd}}"
Write-Output "{{SISJobOutputParameterStart:outcome}}OK{{SISJobOutputParameterEnd}}"
Exit 0
  1. Click the Save Button
  2. Click on th Package Info Entry
  3. Click Baseline button
  4. Select Version 1 via the Drop Down Adjacent to the Baseline button
  5. Click Package and Install drop down, and select Package and Install

Executing the Package Operation

  1. Navigate to (Home > ITOM > Job Queue)
  2. Click Create New button, and select IT Automation Job
    • Name: Get Drive C Information
  3. Select Package: > General Purpose > Disk Information
  4. Click Apply
  5. Enter the following details:
    • Operation: Get Details
    • Site Target: Server |
    • Target Machine: Inventory |
    • Admin Credentials: Network Admin
    • Drive: C
  6. Click Create
In This Document