Yes! you put your finger right on it! Now that I know what was wrong with my code, I was able to review it with command I'm more comfortable with. Probably less performant but I'm in no hurry. I also refered to the solution in https://communities.vmware.com/t5/VMware-PowerCLI-Discussions/Command-to-tell-what-vCenter-you-are-connected-to/td-p/934006
New code:
$snapName = 'CLI Script - Pre Patch'
$snapDescription = 'Scheduled Test CLI Script Snapshot'
$emailAddr = 'me_admin@domain.local'
$snapTime = (Get-date).AddMinutes(5)
$snapMemory = $false
$snapQuiesce = $true
$vmname = "servername"
$vm = get-vm $vmname
# get the vCenter server here
$vCenterServer = $vm.Uid.Split(":")[0].Split("@")[1]
if (($vm | Measure-Object).Count -ne 1 ) { "Unable to locate a specific VM $vmName"; break }
try { $castRunTime = ([datetime]$snapTime).ToUniversalTime() } catch { "Unable to convert runtime parameter to date time value"; break }
if ( [datetime]$snapTime -lt (Get-Date) ) { "Single run tasks can not be scheduled to run in the past. Please adjust start time and try again."; break }
$spec = New-Object VMware.Vim.ScheduledTaskSpec
$spec.Scheduler = New-Object VMware.Vim.OnceTaskScheduler
$spec.Scheduler.runat = $castRunTime
$spec.Name = "CLI Script $($vmname)"
$spec.Description = "Take a snapshot of $($vmname)"
$spec.Enabled = $true
$spec.Notification = $emailAddr
$spec.Action = New-Object VMware.Vim.MethodAction
$spec.Action.Name = "CreateSnapshot_Task"
$spec.action.argument = New-Object VMware.Vim.MethodActionArgument[] (4)
($spec.action.argument[0] = New-Object VMware.Vim.MethodActionArgument).Value = $snapName
($spec.action.argument[1] = New-Object VMware.Vim.MethodActionArgument).Value = $snapDescription
($spec.action.argument[2] = New-Object VMware.Vim.MethodActionArgument).Value = $snapMemory
($spec.action.argument[3] = New-Object VMware.Vim.MethodActionArgument).Value = $snapQuiesce
(Get-View -Id 'ScheduledTaskManager-ScheduledTaskManager'-server $vCenterServer ).CreateScheduledTask($vm.Id, $spec)