Custom Buttons

Modified on Wed, 10 May 2023 at 01:35 PM

With Custom Buttons you can add endless individual "on-click" actions to the console. This is enhancing the functionality and allows you to provide individual sets of actions to users in a role based way. All running in a controlled environment and documented in the client history log.

Custom Button Types

  • Executable
  • PowerShell
  • URL
  • LPM
  • LPM

Type: Executable

With custom buttons of type "Executable" you can start individual applications with a large set of parameters and configurations.

When you select the type "Executable" you have to decide where the executable should be started.
You can select the following execution locations:
Target Location
  • Core
  • ConsoleDevice
  • ConsoleDeviceAsLoggonUser
  • SelectedDevice
  • SelectedDeviceAsLoggedonUser

Target Location Description

Core:
Executable will be started on the EPM Core server with the Console Service Account.

ConsoleDevice:
Executable will be started on the device of the console user and started under the Ivanti Service Account.

ConsoleDeviceAsLoggonUser:
Executable will be started on the device of the console user under the current logged on user account.

TIPP: This is a great feature to live update user individual settings like HKCU Registry keys or modifying files and settings in the current users profile.

SelectedDevice
Executable will be started on the selected device and started under the local system account.

SelectedDeviceAsLoggedonUser
Executable will be started on the selected device under the current logged on user account.

TIPP: This is a great feature to live update user individual settings like HKCU Registry keys or modifying files and settings in the current users profile.


Prerequisites

For all executable locations besides the Core: 
The target device needs to have an Ivanti EPM Agent installed.

For executable locations "ConsoleDevice" and "ConsoleDeviceAsLoggonUser"
It is required, that the device of the console user is having the Ivanti EPM Agent of the current EPM Server installed.


Executable to start

In the field "Executable with path" you have to enter the full local path of the executable to start.
e.g. C:\Windows\System32\cleanmgr.exe

Command Line Parameter

the command line parameter will be passed to the called executable.
e.g.: /verylowdisk

For available parameters consult the parameter section in this document.

Starting of Batch or Power-Shell

It is possible to start batch and powershell scripts as well. However there might be some limitations and settings required to do so.

Batch
To start .cmd or .bat file you need to call the command line interpreter
C:\Windows\System32\cmd.exe
as an executable and pass the command line like this:
/c "C:\temp\sample.bat"


Exit command required
If you use .CMD or .BAT files as executables, please ensure your script includes the "Exit"  command to quit.


Type: PowerShell

With custom buttons of type "PowerShell" you can start individual PowerShell scripts with a large set of parameters and configurations. The given PowerShell script will be deployed and executed each time you use the Custom Button.

When you select the type "PowerShell" you have to decide where the script should be started.
You can select the following target location:
Target Location
  • Core
  • ConsoleDevice
  • ConsoleDeviceAsLoggonUser
  • SelectedDevice
  • SelectedDeviceAsLoggedonUser
For detailed description see Target Location Description.


Prerequisite

For all target locations besides the Core:

The target device needs to have an Ivanti EPM Agent installed.


For target location "ConsoleDevice" and "ConsoleDeviceAsLoggonUser" it is required, that the device of the console user is having the Ivanti EPM Agent of the current EPM Server installed.

The PowerShell executable must be available on the target device.
C:\Windows\System32\WindowsPowerShell\v1.0\powershell.exe



PowerShell Content
You can enter the script to be executed on the target device.
Parameters like %Hostname% (see available Parameters) for your script and they will be replaced before the script is executed at the destination.


Custom Button Info &Feedback
You can display information to the customer or send them back to the console from the script. Therefore, there are 3 different notification types available. You can click on the corresponding button under the script content textbox.

This will add one of the following lines:
  • PostMessageInfo $message
  • PostMessageWarning $message
  • PostMessageError $message

  • ShowMessageInfo         $title $message
  • ShowMessageWarning $title $message
  • ShowMessageError       $title $message

Just fill the variables $message and $title with your content.
Use the feedback to post back information you want to display from the target device in the console.
E.g. result of execution or a property from the users registry.


Error Handling
A feedback is send if the script fails. Further troubleshooting information can be found in the Windows Temp folder. For example:
C:\Windows\Temp\be305476-8f37-49b6-877e-8f072d61fcb3.ps1.log


Remarks
The PowerShell script is run as 32-bit, which should be sufficient for most use cases.
This prevents 64-bit programs to be executed in the script.
In rare cases it can be necessary to call a 64-bit program, but this can be achieved by adding code to the PowerShell script.


$arguments = "-NoProfile -ExecutionPolicy ByPass -WindowStyle Hidden -File `"" + $myinvocation.mycommand.definition + "`""
$path = (Join-Path $Env:SystemRoot -ChildPath "\sysnative\WindowsPowerShell\v1.0\powershell.exe")
Start-Process $path -ArgumentList $arguments -wait


Type: LPM - Ivanti Process Manager


You can easily kick off processes in Ivanti Process Manager. Just fill the event listener name field and select required process parameters from the parameter list appearing under the even listener name field.

You can download the XML signature to import it into the Process Manager.


Prerequisite
The console needs to have the connection to the Process Manager configured proper unde 
Admin | Processes | Process Manager Details


Type: URL

With a custom button of URL you can open URLs and pass parameters from the selected device or the user.


Target

Blank
Open URL in a new browser tab.

Frame
Open the URL in a frame of the console. Advantage: you keep on working with your URL as a subpage of your console. 


Please note
Some websites deny showing their content in frames (X-Frame-Options).


Self
Redirect to the URL in the current window.


URL with parameters

Type your URL including the parameters you like to use.
For available parameters consult the parameter section in this document.

E.g. if you like to find details about the city the user of a selected device lives in, open Google.com and pass the device owners city attribute.

http://www.google.com/search?q=%OwnerCity%

(AD import with LDDA might be required for the attribute "OwnerCity")



Parameters

The following parameters can be passed to an executable:

  • %Hostname% Hostname of the selected computer
  • %IDN% Computer_IDN of the selected computer
  • %SerialNum% Serial number of the selected computer
  • %MAC% Mac address of the selected computer
  • %LoginName% Last login name of the selected computer
  • %PrimaryOwner% Primary owner of the selected computer
  • %FQDN% Fully qualified domain name of the selected computer
  • %IP% IP of the selected computer
  • %ComputerLocation% Location of the selected computer in a directory service
  • %OwnerAddress% Street of the primary user of the selected computer *
  • %OwnerCity% City of the primary user of the selected computer *
  • %OwnerZip% ZIP code of the primary user of the selected computer *
  • %AdminIP% IP Address of the Console user - pushing the button
  • %AdminMail% Email Address of the Console user - pushing the button
  • %AdminUserName% Username of the Console user - pushing the button
  • %AdminTimezoneUtcOffset% UTC offset of selected user-timezone 
  • %LogonServer% Logon server of the selected computer e.g. \\servername 
  • %DeviceID% Device ID (the GUID) of the selected computer - unique identifier
As well as all "Custom Inventory" properties. E.g. %CustomerID%

* AD import with LDDA might be required





Samples


Sample Executable

This sample stops the Vulcan.exe on the selected device to enable a push software deployment in case a security scan takes to long to complete.


Sample Batch


Sample PowerShell




Last Modified Date
02.05.2023

Verified versions
five(9)s Console version 4.2

Tags
  • Custom Buttons

Disclaimer
Even though every care has been taken by five(9)s GmbH to ensure that the information contained in this publication is correct and complete, it is possible that this is not the case. five(9)s GmbH provides the publication "as is", without any warranty for its soundness, suitability for a different purpose or otherwise. five(9)s GmbH is not liable for any damage which has occurred or may occur as a result of or in any respect related to the use of this publication. five(9)s GmbH may change or terminate this publication at any time without further notice and shall not be responsible for any consequence(s) arising there from. Subject to this disclaimer, five(9)s GmbH is not responsible for any contributions by third parties to this publication.


Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select atleast one of the reasons

Feedback sent

We appreciate your effort and will try to fix the article