ITOM Package Creator Quick Guide
Home > Administration > ITOM > ITOM Quick Start Guide > ITOM Package Creator Quick Guide | Index |
IntroductionHornbill 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
- Although no technical skills will be required to follow this guide, further knowledge in the relevant areas will be required in order to get the best out of these features successfully.
Run a Command
From the ITOM page select Package Creator
Enter a Package name: TCP Utilities
Set Target OS to Windows Universal
Click Add Operation button
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}
Click Add Parameter button
Set the following attributes:
Required
Number
Parameter Name: count
Default value: 3
Hint: Number of echo requests to send.
Click Add Parameter button
Set the following attributes:
Required
string
Parameter Name: host
Hint: Target device hostname.
Click Apply
Click Baseline button
Select Version 1 via the Drop Down Adjacent to the Baseline button
Click Package and Install drop down, and select Package and Install
Executing the Package Operation
Navigate to (Home > ITOM > Job Queue)
Click Create New button, and select IT Automation Job
Select Run Package: private:{instance-name} > General Purpose > TCP Utilities (Version 1)
Click Apply
Enter the following details:
Name: Ping Computer
Run Operation: ping
Site Target: Server | <SIS Server>
Target Machine: Inventory |<target computer>
Admin Credentials: Network Admin
Click Create
</div
Windows Installer Package
- From the ITOM page select Package Creator
- Click the New Package button
- Enter a Package name: Software Installer
- Set Target OS to Windows Universal
- Click Upload File button
- Select the following file:
C:\ Documents\ITOM\Packages\Demo.msi
Click on Package Info
Click Add Operation button
Enter the following details:
Operation: Install
Description: Install Windows application
Command Type: Windows Installer
Package: Demo.msi
Action: Install Software
Click Add
Click Add Operation button
Enter the following details:
Operation: Uninstall
Description: Uninstall Windows application
Command Type: Windows Installer
Package: Demo.msi
Action: Uninstall Software
Click Add
Click Baseline button
Select Version 1 via the Drop Down Adjacent to the Baseline button
Click Package and Install drop down, and select Package and Install
Execute Installation Job
- Navigate to (Home > ITOM > Job Queue)
- Click Create New button, and select IT Automation Job
- Select Package:
private:{instance-name} > General Purpose > Software Installer (Version 1)
Click Apply
Enter the following details:
Name: Software Installation
Run Operation: Install
Site Target: Server | <SIS Server>
Target Machine: Inventory |<target computer>
Admin Credentials: 'Network Admin
Click Create
Verify that the following software exists on the target:
Name: Generic Business Application
Publisher: Acme Software Ltd
Execute Uninstallation Job
- Navigate to (Home > ITOM > Job Queue)
- Click Create New button, and select IT Automation Job
- Select Package:
private:{instance-name} > General Purpose > Software Installer (Version 1)
Click Apply
Enter the following details:
Name: Software Uninstallation
Run Operation: UniInstall
Site Target: Server | <SIS Server>
Target Machine: Inventory |<target computer>
Admin Credentials: Network Admin
Click Create
Verify that the following the software no longer exists on the target:
Name: Generic Business Application
Publisher: Acme Software Ltd
Windows Executable Package
- Click the New Package button
- Enter a Package name: Windows Executable
- Set Target OS to Windows Universal
- Click Upload File button
- Select the following file:
C:\ Documents\ITOM\Packages\ShowHarry.exe
Click on Package Info
Click Add Operation button
Enter the following details:
Operation: Show Harry
Description: Windows Executable - Show Harry.exe
Command Type: Windows Executable
Run File: ShowHarry.exe
Click Add
Click Baseline button
Select Version 1 via the Drop Down Adjacent to the Baseline button
Click Package and Install drop down, and select Package and Install
Execute Job
Navigate to (Home > ITOM > Job Queue)
Click Create New (+) button, and select IT Automation Job
Select Run Package: private:{instance-name} > General Purpose > Windows Executable (Version 1)
Click Apply
Enter the following details:
Name: Windows Executable
Run Operation: Show Harry
Site Target: Server | <SIS Server>
Target Machine: Inventory |<target computer>
Admin Credentials: Network Admin
Click Create
Batch Script Package
TBC
PowerShell Script Package
From the ITOM page select Package Creator
Enter a Package name: Disk Information
Set Target OS to Windows Universal
Click the Add new File Button
Enter filename as: diskinfo.ps1 and click Apply
Click Add Operation button
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
Click Add Parameter button
Set the following attributes:
Required
Number
Parameter Name: Dirve
Default value: C
Hint: Enter the Drive Letter.
Output Parameters
Click Add Parameter button
Set the following attributes:
Required
string
Parameter Name: outcome
Click Add
Add the following optional string output parameters:
- Label
- Size
- FreeSpace
- errors
Click Apply
Add Script Content
- Click on the script driveinfo.ps1
- Enter the following code:
Click the Save Button
Click on th Package Info Entry
Click Baseline button
Select Version 1 via the Drop Down Adjacent to the Baseline button
Click Package and Install drop down, and select Package and Install
# 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
Executing the Package Operation
Navigate to (Home > ITOM > Job Queue)
Click Create New button, and select IT Automation Job
Name: Get Drive C Information
Select Package: <instance-name> > General Purpose > Disk Information
Click Apply
Enter the following details:
Operation: Get Details
Site Target: Server | <SIS Server>
Target Machine: Inventory |<target computer>
Admin Credentials: Network Admin
Drive: C
Click Create