we are upgrading from 5.5 to 6.5 and i am doing some powercli testing. When i connect to the new 6.5 vcsa vcenter it prompts me for credentials. I have joined the external PSC to the domain and i am using AD for authentication. The account running powercli is an ad account with admin privledges in vcenter. How do i fix this so my scheduled scripts will work?
Thanks.
Ok after a bunch of searching i found my answer.
We have the PSC and vCenter Split on separate boxes. The PSC was joined to the domain and setup for authentication against the domain. It seems the vCenter Server, also needs to be Joined to the domain. This can only be done via command line /opt/likewise/bin/domainjoin-cli join [domain] [user name] After joining to the domain and rebooting Powercli is passing credentials and longer prompting for credentials. (when running the script with an ad user account with the appropriate permissions.)
Please note before joining to the domain make sure you don’t have old DNS entries sharing the same IP as your vCenter. There is a chance that your VC will pull its name from this old record. To fix that i had to dis-join and reboot a few times, then re join to the domain.
I would like to thank aaronwsmith it was his post on this thread that eventually fixed my problem
Hi,
Check this below link. It may helps to you.
https://www.vmguru.com/2015/11/powershell-friday-connecting-to-vcenter/
-Praveen
Could it be that you had CredentialStoreItems defined for the old vCenter?
Does it still prompt for credentials when you create them with New-VICredentialStoreItem for the new vCenter.
Note that you have to create them with the same AD account and on the same computer where you run the scripts.
See also Scripted Connect-VIServer prompts for credentials when connecting to vCenter 6.5 Appliance
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Ok after a bunch of searching i found my answer.
We have the PSC and vCenter Split on separate boxes. The PSC was joined to the domain and setup for authentication against the domain. It seems the vCenter Server, also needs to be Joined to the domain. This can only be done via command line /opt/likewise/bin/domainjoin-cli join [domain] [user name] After joining to the domain and rebooting Powercli is passing credentials and longer prompting for credentials. (when running the script with an ad user account with the appropriate permissions.)
Please note before joining to the domain make sure you don’t have old DNS entries sharing the same IP as your vCenter. There is a chance that your VC will pull its name from this old record. To fix that i had to dis-join and reboot a few times, then re join to the domain.
I would like to thank aaronwsmith it was his post on this thread that eventually fixed my problem