Managing JAMS with Powershell

List of command examples for managing JAMS using Powershell. Once you have installed the JAMS client locally, you can import the module using:

import-module JAMS

Job History

Get failed jobs within the last 24 hours

Get-JAMSHistory -Server JAMSServer -Status error

Get the history of failed jobs within the last 24 hours that are also in the PROD folder

Get-JAMSHistory -Server JAMSServer -Folder prod -Status error

Get the history of jobs within the last 24 hours who’s name begins with FTP

Get-JAMSHistory -Server JAMSServer -Name FTP* 

Job Management

Pause a queue called PROD

Stop-JAMSQueue -Server JAMSServer -Name PROD 

Stop all queues on the server - Executing jobs finish their current execution

Get-JAMSQueue -Server JAMSServer | Stop-JAMSQueue 

Start all queues on the server

Get-JAMSQueue -Server JAMSServer | Start-JAMSQueue 

 Get list of all executing jobs

Get-JAMSEntry -Server JAMSServer -State executing 

Pause a job - I think this will only pause it until it’s next schedule kicks off

Suspend-JAMSEntry -Server JAMSServer -Name MyImportantJob 

Resume a job

Resume-JAMSEntry -Server JAMSServer -Name MyImportantJob 

Posted in DevOps with : PowerShell