Before attempting to transfer objects with any of the methods specified below, users must ensure that the JAMS Client has access to the relevant JAMS Servers.
Add or adjust JAMS Servers where items will be transferred:
- Open the JAMS Client
- Select the Client Settings icon (gear in the top right corner of the GUI).
- Select Servers from the drop-down list.
- A dialog box with available servers will appear. If a necessary server is missing, add a server by selecting the Add button and completing the dialog.
- If a listed server is not defined correctly, select the server name from the dialog window, then click Edit and use the dialog to correct the server definition.
Once set, users may test their connections by selecting a server using the server selection drop-down in the top-right of the JAMS Client GUI.
Once servers are properly defined, users may begin transferring items using the following options:
- Copying Jobs/Setups/Systems from the Client Interface
- Utilize the PowerShell Provider Drive
- Export/Import with JAMS.exe
- Export/Import with PowerShell
Copying Job/Setup/System from Client Interface
When users are viewing the list of Jobs, Setups, or Folders, a user can right-click on any of them and select "Copy To" to copy that Job, Setup, or System to the same server (with a different name) or to a different server (if it is accessible as described above). When users copy, the user will be asked to enter the Folder Name and/or Setup/Job Name to which the user wants to copy, as well as select the server.
NOTE: Jobs cannot be copied from JAMS V6.X to JAMS V7.X, nor from JAMS V7.X to JAMS V6.X
Utilize the PowerShell provider drive
Users can utilize PowerShell and the JAMS PowerShell provider drive capabilities in order to synchronize Jobs, Setups, etc. between JAMS Servers. A JAMS PowerShell provider drive allows a user to access the JAMS SQL Database backend as if it were a flat file system. In order to add a new PowerShell drive, open a PowerShell window (run as Administrator), and type the following information at the PowerShell prompt:
New-PSDrive MyDrv JAMS your.server.name
Where "MyDrv" is your specification of the new "drive letter/phrase" and "your.server.name" is the name of the server for which the user wants to create the drive.
Once users have a drive added for the servers, a user can change directory to that drive and then run simple "dir" commands to drill down through the file structure of each server. For example, if a user wishes to view all of the Jobs on a server, a user could enter the following:
PS C:\temp> cd JD:\ PS JD:> cd Folder/Samples/
This will go into the Systems directory, then into the Samples System, and finally into the Jobs directory for that System. Users can then perform all of the same commands as a user would on any flat file system to copy/move/etc. any piece of JAMS information from one server to another or to a different name on the same server.
Export/Import with JAMS.exe
A user can export and import the Jobs and Setups with the JAMS.exe command line environment. Please refer to this article for more information.
Export/Import with PowerShell
Users can also export/import Jobs, Setups, Folders, Triggers, Variables, etc. with the JAMS PowerShell Module and its Export-JAMSXml and Import-JAMSXml cmdlets.
Export example:
# # Get a list of all Jobs # $job = Get-ChildItem JAMS::localhost\Folder\JAMS\* -Objecttype Job # # Export all Jobs to XML # Export-JAMSXml C:\temp\file.xml $job
Import example:
# # Import Jobs, etc in XML to JAMS # $filepath = c:\temp\file.xml Import-JAMSXml $filepath
Just to clarify, for the localhost\Folder\JAMS string in the Get-ChildItem example for remote servers it would be something like:
$job = Get-ChildItem JAMS::SourceJamsSrvr.com\MyFldr\SubFolder\* -Objecttype Job
And don't forget to import the module first.