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\ -verbose -Recurse }
This can also be used to copy "Users" account definitions. Simply replace 'Dates' with 'Users' in the above script.
how would you handle the ` $dateName = $date.DateTypeType` portion for copying users and not dates?
Hello Dawn, you will want to use something like
$userName = $user.UserName