PowerShell commands to manage TRIRIGA instances.
This project provides two modules:
- Tririga-Manage: Commands to manage TRIRIGA installations on Windows
- Tririga-Manage-Rest: Commands to manage TRIRIGA instances using the admin REST API
You can install each independently.
If Tririga-Manage-Rest is installed, the Upload-TririgaOmp and
Import-TririgaOmp can use it to find the actual server running the
ObjectMigration agent.
!NOTE
IBM and TRIRIGA are trademarks or registered trademarks of International Business Machines Corp.
This project is not affiliated with IBM.
- Simple way to refer to environments and instances
- Operate on all instances in an evironment with a single command.
- Confirmation when working on production instances
- The outputs are PowerShell objects and the commands can be composed for advanced functionality.
Tririga-Manage
- Control TRIRIGA service remotely (
Start,Stop,Enable,Disable) UploadorImportObjectMigration packages- Tail or open TRIRIGA logs
- Tail or open WebSphere/Liberty logs
- Open TRIRIGA installation folder
- Open WebSphere/Liberty installation folder
- Launch database tool and connect to the environment
- Launch RDP to each instance and the database server
- Open PowerShell remote shell to each instance
Tririga-Manage-Rest
- Get list of Active Users
- Get list of Users with access to admin console
- Get Build Number, System Info and Summary Info
- Start or Stop Agents
- Enable or disable logging
- Get or set properties in TRIRIGAWEB.properties and other .properties files.
- Lock and Unlock TRIRIGA.
- Enable or Disable workflow instance recording.
- Windows Powershell 5.x or PowerShell 7.x
- For
Tririga-Manage: TRIRIGA servers must be running Windows - For
Tririga-Manage: Your local Windows account must have access to the Windows server running TRIRIGA
Enable script execution:
Set-ExecutionPolicy RemoteSigned -Scope CurrentUser
Install the modules:
Install-Module Tririga-Manage -Scope CurrentUser Install-Module Tririga-Manage-Rest -Scope CurrentUser
If you are using PowerShell 5.1, some methods may not trigger automatic loading of the module. Manually import the module in your
$Profilefile to force module loading. Run in a PowerShell window:"Import-Module Tririga-Manage" | Out-file "$Profile" -append "Import-Module Tririga-Manage-Rest" | Out-file "$Profile" -append
Configure the environment as described in the Configuration section.
Before using the commands, you will need to set a configuration variable named
$TririgaEnvironments with details about your environments.
If you wish to use the Open-TririgaDatabase command, you will also need to set
the $DBeaverBin variable with the path to the dbeaver.exe file.
To load the sample configuration, open a PowerShell window and paste the following:
Initialize-TririgaConfigurationNote the location of the sample file that is printed.
Edit the sample file. Refer to the comments for instructions:
# This file is a PowerShell Data file # Doc: https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_data_files @{ # The key is the unique name you want to use for this environment # This is used as the value for the -Environment argument "LOCAL" = @{ # If $true, any actions that might modify the environment will require confirmation # Set this on Production environment. Warn = $False; # The DBeaver profile associated with this environment DbProfile = "Tririga Local"; DbHost = "localhost"; # # Username and Password (non-SSO) for use with the REST api calls is # stored encrypted. Run ``Set-TririgaCredential`` command to store it. # # List of all your TRIRIGA servers/instances Servers = @{ # The key is the unique name you want to use for this instance # This is used as the value for the -Instance argument "ONE" = @{ # The hostname of this instance Host = "localhost" # The path where TRIRIGA is installed on the server Tririga = "C:\IBM\Tririga1" # The path where WebSphere profile is located on the server WebSphere = "C:\Program Files\IBM\WebSphere\AppServer\profiles\AppSrv01\logs\server1" # The Windows service that controls this TRIRIGA instance Service = "TestService1" # The URL to access this TRIRIGA instance Url = "http://localhost:9080" # Optional. Url that bypasses SSO (used when you use IIS auth). # For SAML SSO, leave this out ApiUrl = "http://localhost:9081" # The URL to access this instance's WebSphere console WasUrl = "http://localhost:9060/ibm/console" # Optional. This should be either hostname or if set, the # INSTANCE_NAME property in TRIRIGAWEB.properties This is used # to match agent host information to an instance InstanceName = "<ANY>" # If you cannot use Rest API to identify the ObjectMigration # server, indicate that this instance run the object migration # agent. ObjectMigrationAgent = $true }; # Repeat for all other servers/instances "TWO" = @{ # ... }; } }; # Repeat for all other environments "REMOTE" = @{ # ... }; }
To use the REST API with
Tririga-Manage-Rest, you need to enter a username and password. These are stored separately from the server configuration and encrypted using the Windows Data Protection API.To store credentials, run:
Set-TririgaCredential <environment>
The
<environment>name must match the environment name used in theenvironments.psd1file.Repeat the command for each environment.
All commands accept a -Environment argument. For example, with the sample
configuration above, you can use either -Environment LOCAL or -Environment REMOTE
Some commands require a -Instance argument or optionally accept it. When it
is optional and omitted, action will be performed on the first or all instances
in the environment, depending on the nature of the command. With the sample
configuration above, you can use either -Instance ONE or -Instance TWO
with -Environment LOCAL.
Let's start with getting information about the environment. Use
Get-TririgaSummary command:
PS> Get-TririgaSummary LOCALTWO
operatingSytem : Linux amd64 null
noofcpus : 4
baseApplicationServer : Liberty
users : 55 users online
...
environment : LOCALTWO
instance : TWOThe output is an object that you can manipulate using PowerShell object commands.
For example, to get just the operatingSytem [sic] value, run:
PS> Get-TririgaSummary LOCALTWO | Select-Object operatingSytem
operatingSytem
--------------
Linux amd64 nullThis output is still an object. To get just the text value:
PS> Get-TririgaSummary LOCALTWO | %{ $_.operatingSytem }
Linux amd64 nullIf you want to run this against all your environments, you can run:
PS> @("LOCAL", "LOCALTWO") | %{ Get-TririgaSummary -All $_ } | Select-Object operatingSytem, environment, instance
operatingSytem environment instance
-------------- ----------- --------
Linux amd64 null LOCAL ONE
Linux amd64 null LOCALTWO TWO
Linux amd64 null LOCALTWO ONETo see all currently active sessions:
PS> Get-TririgaActiveUser LOCAL | Sort-Object userAccount -Unique
userAccount fullName email lastTouchDuration
----------- -------- ----- -----------------
system System System 00d:03h:17m:00s
system System System 00d:03h:17m:00s
system System System 00d:03h:17m:00s
system System System 00d:03h:17m:00sThere are a few duplicate entires here. To get just the unique users:
PS> Get-TririgaActiveUser LOCAL | Sort-Object userAccount -Unique
userAccount fullName email lastTouchDuration
----------- -------- ----- -----------------
system System System 00d:03h:17m:00sFor convenience, the Get-TririgaActiveUser command also has a -Unique
switch, which does the same thing:
PS> Get-TririgaActiveUser LOCAL -Unique
userAccount fullName email lastTouchDuration
----------- -------- ----- -----------------
system System System 00d:03h:17m:00sEven if this switch was not present, using PowerShell you can filter and manipulate the output to get exactly the format you need.
Some commands run against all instances in the environment by default. This is done in cases where the output might be different from each instance
Let's run Get-TririgaBuildNumber
PS> Get-TririgaBuildNumber LOCALTWO
buildNumber : 301221
...
environment : LOCALTWO
instance : TWO
buildNumber : 301221
...
environment : LOCALTWO
instance : ONEYou can see that it ran against both instances in the LOCALTWO environment
and returned two objects.
Suppose, you want to check if all the instances in your environment have the same build number:
PS> Get-TririgaBuildNumber LOCALTWO | % { $_.buildNumber } | Sort-Object -Unique
301221By showing only unique build numbers, you can quickly verify that all instances have the same build number.
Other commands run against only one instance in the environment by default. This is done in cases where the output is the same no matter what instance you query.
Let's check the status of all agents. You will get the same result no matter what server you query:
PS> Get-TririgaAgent LOCAL
ID Agent Hostname Status
-- ----- -------- ------
210 SNMPAgent Not Running
211 IncomingMailAgent <ANY> Running
212 ObjectMigrationAgent <ANY> Running
213 DataImportAgent localhost Running
202 WFAgent localhost Running
203 ObjectPublishAgent <ANY> Running
214 SchedulerAgent localhost Running
204 ReportQueueAgent <ANY> Running
215 WFNotificationAgent <ANY> Running
216 DataConnectAgent Not Running
205 ReserveSMTPAgent Not Running
206 PlatformMaintenanceScheduler <ANY> Running
207 ExtendedFormulaAgent <ANY> Running
208 FormulaRecalcAgent <ANY> Running
209 WFFutureAgent <ANY> RunningAgain, we can apply an ad-hoc filter to see just the running ones:
PS> Get-TririgaAgent LOCAL | ? Status -eq Running
ID Agent Hostname Status
-- ----- -------- ------
211 IncomingMailAgent <ANY> Running
212 ObjectMigrationAgent <ANY> Running
213 DataImportAgent localhost Running
202 WFAgent localhost Running
203 ObjectPublishAgent <ANY> Running
214 SchedulerAgent localhost Running
204 ReportQueueAgent <ANY> Running
215 WFNotificationAgent <ANY> Running
206 PlatformMaintenanceScheduler <ANY> Running
207 ExtendedFormulaAgent <ANY> Running
208 FormulaRecalcAgent <ANY> Running
209 WFFutureAgent <ANY> RunningThis is a common need, so you can use the convenience shortcut:
PS> Get-TririgaAgent LOCAL -RunningOperations that affect the system state all have a -WhatIf and -Confirm switches.
Use -WhatIf switch to preview the changes without making any changes:
> Stop-TririgaAgent LOCAL WFAgent -WhatIf
What if: Performing the operation "Stop" on target "WFAgent [202] on localhost".Use -Confirm switch to review each change as they are applied:
> Stop-TririgaAgent LOCAL WFAgent -Confirm
Confirm
Are you sure you want to perform this action?
Performing the operation "Stop" on target "WFAgent [202] on localhost".
[Y] Yes [A] Yes to All [N] No [L] No to All [S] Suspend [?] Help (default is "Y"): NYou will see one prompt for each change the the command is about to make. For example, with Workflow Agents, you may have several agents. You will be asked to confirm Stop on each of these agents. You can stop some and leave others running.
Some commands can be chained together to perform complex operations.
For example, suppose you want to take the FRONT_END_SERVER setting on all
your instances (which may all have different values,) and change the protocol
to https while preserving the rest of the value. To do that, run:
PS> Get-TririgaProperty LOCAL FRONT_END_SERVER
environment instance file FRONT_END_SERVER
----------- -------- ---- ----------------
LOCAL ONE TRIRIGAWEB http://localhost:9080/
PS> Get-TririgaProperty LOCAL FRONT_END_SERVER `
| % { $_.FRONT_END_SERVER = $_.FRONT_END_SERVER.replace("http:", "https:"); $_ } `
| Set-TririgaProperty
environment instance file FRONT_END_SERVER
----------- -------- ---- ----------------
LOCAL ONE TRIRIGAWEB https://localhost:9080/The see a list of all commands, run:
Get-Command -Module Tririga-Manage*To view detailed help for a command, run:
Get-Help <command> -DetailedYou can click on the command names below to learn more about each command.
The Tririga-Manage module operates on TRIRIGA installation on a Windows server.
| Name | Synopsis |
|---|---|
| Initialize-TririgaConfiguration | Initialize-TririgaConfiguration [<CommonParameters>] |
| Open-TririgaDatabase | Opens Dbeaver and connects to the TRIRIGA database |
| Get-TririgaDatabaseHost | Gets the name of the database host for an environment |
| Get-TririgaEnvironment | Gets all known environments |
| Open-TririgaFolder | Opens a TRIRIGA installation directory path |
| Enter-TririgaHost | Starts a remote powershell session to a TRIRIGA instance |
| Enter-TririgaHostDb | Starts a remote powershell session to a TRIRIGA database server |
| Get-TririgaInstance | Gets all known instances in a given environment |
| Get-TririgaLog | Tails a TRIRIGA log file |
| Open-TririgaLog | Opens a TRIRIGA log file |
| Upload-TririgaOmp | Uploads a local OMP zip file to TRIRIGA |
| Import-TririgaOmp | Uploads and imports a local OMP zip file to TRIRIGA |
| Save-TririgaOmp | Uploads a local OMP zip file to TRIRIGA |
| Open-TririgaRDP | Opens an RDP client connection to the TRIRIGA server |
| Open-TririgaRDPDb | Opens an RDP client connection to the TRIRIGA Database server |
| Disable-TririgaService | Disables TRIRIGA service |
| Enable-TririgaService | Enables TRIRIGA service |
| Get-TririgaService | Get the current status of TRIRIGA service |
| Restart-TririgaService | Restarts TRIRIGA service |
| Start-TririgaService | Starts TRIRIGA service |
| Stop-TririgaService | Stops TRIRIGA service |
| Get-TririgaServiceMssql | Get the current status of TRIRIGA SQL Server database service |
| Open-TririgaWasFolder | Opens a WebSphere profile path |
| Get-TririgaWasLog | Tails a WebSphere log file |
| Open-TririgaWasLog | Opens a WebSphere log file |
| Open-TririgaWasWeb | Opens the WebSphere Admin Console |
| Open-TririgaWeb | Opens a TRIRIGA environment |
| Open-TririgaWlpFolder | Opens a WebSphere Liberty profile path |
| Get-TririgaWlpLog | Tails a WebSphere Liberty log file |
| Open-TririgaWlpLog | Opens a WebSphere Liberty log file |
The Tririga-Manage-Rest module operates on TRIRIGA using the management REST API.
| Name | Synopsis |
|---|---|
| Get-TririgaActiveUser | Gets a list of currently logged in users |
| Get-TririgaAdminUser | Gets a list of users who can access the TRIRIGA Admin Console |
| Get-TririgaAgent | Gets TRIRIGA Agents configuration |
| Start-TririgaAgent | Starts a TRIRIGA agent |
| Stop-TririgaAgent | Stops a TRIRIGA agent |
| Get-TririgaAgentHost | Gets the configured host(s) for the given agent |
| Get-TririgaBuildNumber | Gets TRIRIGA build number |
| Clear-TririgaBusinessObject | Clears Business Object Records, removes stale data (12 hrs and older) |
| Clear-TririgaCache | Clears a cache |
| Get-TririgaCacheHierarchyTree | Gets the hierarchy tree cache status details |
| Get-TririgaCacheMode | Gets the cache processing mode |
| Set-TririgaCacheMode | Sets the cache processing mode |
| Set-TririgaCredential | Stores credential in an encrypted file |
| Get-TririgaDatabase | Gets the database environment information |
| Clear-TririgaDatabaseAll | Runs a full database cleanup |
| Get-TririgaDatabaseSpace | Gets the database space information |
| Invoke-TririgaDatabaseTask | Invokes a database task |
| Write-TririgaLogMessage | Write a message to TRIRIGA Log file |
| Reload-TririgaPlatformLogging | Reload logging categories from disk |
| Disable-TririgaPlatformLogging | Disables TRIRIGA platform Logging for the given categories |
| Enable-TririgaPlatformLogging | Enables TRIRIGA platform Logging for the given categories |
| Get-TririgaPlatformLogging | Gets information about TRIRIGA platform Logging |
| Sync-TririgaPlatformLogging | Reload logging categories from disk |
| Add-TririgaPlatformLoggingCategory | Add a new platform logging category and level |
| Reset-TririgaPlatformLoggingDuplicates | Reset duplicate categories |
| Get-TririgaProperty | Gets a setting in a TRIRIGA properties file |
| Set-TririgaProperty | Sets settings in a TRIRIGA properties file |
| Clear-TririgaScheduledEvent | Clears Scheduled Events |
| Get-TririgaServerInformation | Retrieves information about the TRIRIGA server. |
| Get-TririgaServerXml | Get the WebSphere Liberty server.xml file |
| Get-TririgaSummary | Gets basic information about a TRIRIGA instance |
| Lock-TririgaSystem | Locks the TRIRIGA server |
| Unlock-TririgaSystem | Unlocks the TRIRIGA server |
| Clear-TririgaWorkflowInstance | Clears Workflow Instance data |
| Disable-TririgaWorkflowInstance | Sets the workflow instance recording setting to ERRORS_ONLY |
| Enable-TririgaWorkflowInstance | Sets the workflow instance recording setting to ALWAYS |
| Set-TririgaWorkflowInstance | Updates workflow instance recording setting |
tririga-manage-ps1. PowerShell Modules to manage IBM TRIRIGA. Copyright (C) 2026 Nithin Philips This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program. If not, see <http://www.gnu.org/licenses/>.