Difference between revisions of "ITOM Package Creator Quick Guide"
(18 intermediate revisions by one other user not shown) | |||
Line 27: | Line 27: | ||
{{infobox|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.}} | {{infobox|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.}} | ||
− | == | + | <div class="mw-collapsible mw-collapsed" data-collapsetext="Show Less" data-expandtext="Read More" style="width:1050px"> |
− | + | == Run a Command == | |
+ | <div class="mw-collapsible-content"> | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>From the ITOM page select Package Creator</p></li> | <li><p>From the ITOM page select Package Creator</p></li> | ||
Line 82: | Line 83: | ||
</li> | </li> | ||
<li><p>Click '''Create'''</p></li></ol> | <li><p>Click '''Create'''</p></li></ol> | ||
+ | </div | ||
+ | </div> | ||
<div class="mw-collapsible mw-collapsed" data-collapsetext="Show Less" data-expandtext="Read More" style="width:1050px"> | <div class="mw-collapsible mw-collapsed" data-collapsetext="Show Less" data-expandtext="Read More" style="width:1050px"> | ||
Line 230: | Line 233: | ||
== PowerShell Script Package == | == PowerShell Script Package == | ||
<div class="mw-collapsible-content"> | <div class="mw-collapsible-content"> | ||
− | |||
− | |||
− | |||
− | |||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>From the ITOM page select Package Creator</p></li> | <li><p>From the ITOM page select Package Creator</p></li> | ||
Line 252: | Line 251: | ||
</li> | </li> | ||
</ol> | </ol> | ||
− | + | ====Input Parameters==== | |
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li><p>Click '''Add Parameter button'''</p></li> | <li><p>Click '''Add Parameter button'''</p></li> | ||
Line 264: | Line 263: | ||
</li> | </li> | ||
</ol> | </ol> | ||
− | |||
====Output Parameters==== | ====Output Parameters==== | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
Line 276: | Line 274: | ||
</li> | </li> | ||
</ol> | </ol> | ||
− | <li><p>Add the following | + | <li><p>Add the following optional string output parameters:</p></li> |
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><b> | + | <li><b>Label</b></li> |
− | <li><b> | + | <li><b>Size</b></li> |
− | <li><b> | + | <li><b>FreeSpace</b></li> |
− | <li><b> | + | <li><b>errors</b></li> |
</ol> | </ol> | ||
<li><p>Click '''Apply'''</p></li> | <li><p>Click '''Apply'''</p></li> | ||
</ol> | </ol> | ||
+ | |||
====Add Script Content==== | ====Add Script Content==== | ||
<ol style="list-style-type: decimal;"> | <ol style="list-style-type: decimal;"> | ||
<li>Click on the script <b>driveinfo.ps1</b></li> | <li>Click on the script <b>driveinfo.ps1</b></li> | ||
<li>Enter the following code:</li> | <li>Enter the following code:</li> | ||
− | + | ||
− | |||
− | |||
− | |||
− | |||
<code><pre><nowiki> | <code><pre><nowiki> | ||
# Example PS ITOM Package Script | # Example PS ITOM Package Script | ||
Line 300: | Line 295: | ||
[String]$Drive = "C" | [String]$Drive = "C" | ||
) | ) | ||
+ | |||
# Operation Logic | # Operation Logic | ||
− | $volinfo = Get-Volume -DriveLetter $Drive | + | 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 | # Package Output Parameters | ||
− | Write-Output "{{ | + | Write-Output "{{SISJobOutputParameterStart:Label}}$($volinfo.FileSystemLabel){{SISJobOutputParameterEnd}}" |
− | Write-Output "{{ | + | Write-Output "{{SISJobOutputParameterStart:Size}}$($volinfo.Size){{SISJobOutputParameterEnd}}" |
− | Write-Output "{{ | + | Write-Output "{{SISJobOutputParameterStart:FreeSpace}}$($volinfo.SizeRemaining){{SISJobOutputParameterEnd}}" |
− | Write-Output "{{ | + | Write-Output "{{SISJobOutputParameterStart:outcome}}OK{{SISJobOutputParameterEnd}}" |
Exit 0 | Exit 0 | ||
+ | |||
</nowiki></pre></code> | </nowiki></pre></code> | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | </ | + | <li><p>Click the Save Button</p></li> |
− | < | + | <li><p>Click on th Package Info Entry</p></li> |
<li><p>Click '''Baseline''' button</p></li> | <li><p>Click '''Baseline''' button</p></li> | ||
<li><p>Select ''Version 1''' via the Drop Down Adjacent to the Baseline button'''</p></li> | <li><p>Select ''Version 1''' via the Drop Down Adjacent to the Baseline button'''</p></li> | ||
Line 328: | Line 327: | ||
<li><p>Navigate to ('''Home > ITOM > Job Queue''')</p></li> | <li><p>Navigate to ('''Home > ITOM > Job Queue''')</p></li> | ||
<li><p>Click Create '''New button''', and select '''IT Automation Job'''</p></li> | <li><p>Click Create '''New button''', and select '''IT Automation Job'''</p></li> | ||
− | <li><p> | + | <li><p>Name: '''Get Drive C Information'''</p></li> |
+ | <li><p>Select Package: '''<instance-name> > General Purpose > Disk Information''' | ||
<li><p>Click '''Apply'''</p></li> | <li><p>Click '''Apply'''</p></li> | ||
<li><p>Enter the following details:</p> | <li><p>Enter the following details:</p> | ||
<ol style="list-style-type: lower-alpha;"> | <ol style="list-style-type: lower-alpha;"> | ||
− | <li><p> | + | <li><p>Operation: '''Get Details'''</p></li> |
− | |||
<li><p>Site Target: '''Server | <SIS Server>'''</p></li> | <li><p>Site Target: '''Server | <SIS Server>'''</p></li> | ||
<li><p>Target Machine: '''Inventory |<target computer>'''</p></li> | <li><p>Target Machine: '''Inventory |<target computer>'''</p></li> | ||
− | <li><p>Admin Credentials: '''Network Admin'''</p></li></ol> | + | <li><p>Admin Credentials: '''Network Admin'''</p></li> |
+ | <li><p>Drive: '''C'''<p></li> | ||
+ | </ol> | ||
</li> | </li> | ||
<li><p>Click '''Create'''</p></li></ol> | <li><p>Click '''Create'''</p></li></ol> | ||
<div class="mw-collapsible mw-collapsed" data-collapsetext="Show Less" data-expandtext="Read More" style="width:1050px"> | <div class="mw-collapsible mw-collapsed" data-collapsetext="Show Less" data-expandtext="Read More" style="width:1050px"> | ||
− | |||
</div></div> | </div></div> | ||
== Linux Shell Script Package == | == Linux Shell Script Package == | ||
+ | |||
+ | [[Category:ITOM]] |
Latest revision as of 20:05, 11 April 2024
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