can we use PowerCLI to copy a template from vcenter B to vcenter B, I found a solution from 2015, want to know if that is still the process or is there another way to do it after all this time.
$vmName = 'MyVM'
$templateName = 'template'
$tgtDC = 'dc'
$dc = Get-Datacenter -Name $tgtDC
# Get the source VM
$vm = Get-VM -Name $vmName
# Clone VM and move it to the target DC
New-VM -VM $vm -Name $templateName | Move-VM -Destination $dc
# Convert the cloned VM to a template
Get-VM -Name $templateName | Set-Template
did not know if there was improved process after all this years