JAMS now includes support for PowerShell, Microsoft's new scripting environment. JAMS supports PowerShell in three ways:

Running PowerShell Jobs

JAMS now includes a PowerShell host designed specifically to execute PowerShell scripts under the control of JAMS. We include two new PowerShell execution methods and, as always, it's easy to add your own execution methods so that JAMS works they way you want it to.

JAMS PowerShell Commands

JAMS includes a PowerShell Snap-In with an extensive array of cmdlets that make it easy to control JAMS and your JAMS scripts.

The commands in the JAMS Snap-in include:

ConvertTo-DateConverts a natural language date into a specific DateTime
Disable-JAMSTimeDisables a JAMS Named Time
Disable-JAMSTriggerDisables a JAMS Trigger
Enable-JAMSTimeEnables a JAMS Named Time
Enable-JAMSTriggerEnables a JAMS Trigger
Get-JAMSEntryGets JAMS Entries
Get-JAMSHistoryGets JAMS History (Are you starting to notice the consistency?)
Get-JAMSVariableGet a JAMS Variable
Reset-JAMSTriggerResets a JAMS Trigger
Restart-JAMSEntryRestarts a JAMS Entry
Resume-JAMSEntryResumes a suspended JAMS Entry
Set-JAMSEntrySets attributes of a JAMS Entry
Set-JAMSQueueSets attributes of a JAMS Queue
Set-JAMSVariableSets the value of a JAMS Variable
Start-JAMSEntryStarts a JAMS Entry
Start-JAMSQueueStarts a JAMS Queue
Stop-JAMSEntryStops a JAMS Entry
Stop-JAMSQueueStops a JAMS Queue
Submit-JAMSEntrySubmits a new JAMS Entry
Suspend-JAMSEntrySuspends a JAMS Entry
Wait-JAMSEntryWaits for the completion of a JAMS Entry

JAMS PowerShell Provider

JAMS includes a PowerShell Provider which exposes the JAMS objects directly to the PowerShell environment. You can add access a JAMS Service directly with syntax similar to this:

C:\ PS> dir JAMS::servername\

You can simplify that syntax by adding PowerShell drives, like this:

C:\ PS> New-PSDrive JD JAMS servername

Which creates a new PowerShell Drive named JD which points to the JAMS Server on servername. Now, if you do:

C:\ PS> dir JD:

You should get something like this:

    Directory: mvpsi.jams\JAMS::servername


Name               Description
----               -----------
Configuration      Configuration Settings
Dates              Special Date Definitions
Menus              Menu Definitions
Methods            Execution Methods
Queues             Queue Definitions
Resources          Resource Definitions
Systems            System Definitions
Times              Named Time Definitions
Triggers           Trigger Definitions
Variables          Variable Definitions

Current JAMS users will recognize those names as JAMS objects and, as you've probably already guessed, your JAMS object definitions can be found beneath those top level directories so, entering:

C:\ PS> dir JD:\Triggers

will show you your JAMS Trigger definitions. Even better, as PowerShell users already know, the "dir" command is actually an alias for Get-ChildItem and what it's actually returning is a collection of JAMS Trigger objects which means it's easy to manipulate and examine them with PowerShell scripts or commands.

For example:

dir JD:\Triggers | sort Description

Gets the collection of Triggers then sorts it by Description.

dir JD:\Triggers | where {$_.Description -like "*way cool*"}

Gets the collection of Triggers then filters the list returning only the Triggers that have "way cool" in their description.

As you can see, PowerShell support adds a lot of power to JAMS.

OpenVMS too!

If you're using JAMS on OpenVMS, you can install the JAMS VMS Connection server and use PowerShell to manipulate JAMS on OpenVMS just like you could if it was running under Windows!