Copy Users and Dates From One JAMS Server to Another

Follow

 

Custom calendar "Dates" definitions can be copied from one JAMS Server to another using the following PowerShell script:

     

### Import the JAMS Module
Import-Module JAMS

### Define your JAMS Server JAMS Drives

New-PSDrive JDServer1 JAMS localhost
New-PSDrive JDServer2 JAMS TOE

### CD into the source JAMS Server's Users folder
cd JDServer1:\dates

### Copy everything to the destination server
### Get the dates
$dates = GCI JDServer1:\dates

### Loop through each date definition and copy the dates list contained inside them
ForEach($date in $dates){

	$dateName = $date.DateTypeType	
	Write-Host "Now copying dates for:"$dateName

	Copy-Item -path JDServer1:\dates\$dateName\* -Destination JDServer2:\dates\$dateName -verbose -Recurse

}

      

This can also be used to copy "Users" account definitions. Simply replace 'Dates' with 'Users' in the above script.

Have more questions? Submit a request

Comments