Hi guys,
I've recently upgrade our vCenter enrionment to 5.1 and trying deploy virtual machine on it using the PowerCLI 5.1 U1.
I'm using Microsoft System Center Orchestrator 2012 for that matter, but the PowerCLI is native and there's no use in special objects or operations.
So, what happens is I manage to create a VM but than, I try to set its hardware - meaning, set its network cards. The 2nd object fails with the following error:
"
Not authenticated. Possible cause of this error is that connection was left unused for a while and session has timed out. In such case use Connect-VIServer to reconnect."
Is there any chance this is related to the SSO or the new version or PowerCLI?
Note: I use specific credentials when I connect to the vCenter
Thanks
Having the same problem today after upgrading to PowerCLI 5.8R1.
I have narrowed down the problem to the new-vm command. I have put it on a separate .NET object and it fails with that "Not Authenticated" error.
The code:
add-pssnapin "Vmware.VimAutomation.Core"
Connect-VIserver -server "vCenter_Name" -user "Domain\User" -password "password"
$DeployOutput = New-VM -VMHost "VMHost_NAME" -Name "VM_NAME" -Location "Folder_NAME" -Template "Template_NAME" -Datastore "Datastore_NAME" 2>&1
$DeployStatus = $?
NetworkStatus = Get-VM "VM_name" | Get-NetworkAdapter | Set-NetworkAdapter -StartConnected:$True -Confirm:$false
The entire object fails and I can't get the DeployOutput (even though it's published). Furthermore, the VM itself is CREATED event though the object failed.
Hello guys, I had the same issue. Solved changing the protocol to HTTPS:
Connect-VIServer -Server [SERVER] -Protocol https -User [USER] Password [PASSWD]
I hope that it help.
Regards