We have two PSCs which points to multiple VCs running in our environment and always there will be a question that which PSC is pointing to which VC and there is easy way to find it using the web-client and also by vmafd-cli utility. Pls refer the blog from virtuallyghetto for more info and in this blog we can see by using the powershell script to check the same.
I believe currently there is no shell cmdlets from VMware to allow us to run shell commands directly using the powershell\powercli and while searching for any alternative, found the tool plink.exe which allows to run the command using the SSH . Pls refer the blog from Virtu-Al.Net for more info..
Idea of this code for plink.exe was taken from lucd and modified according to the requirement. pls check the help of plink.exe for more info.
To run this script download the plink.exe and provide the path of the same.
Download the script from the below location.
Reference :
http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html
Easier:
((Get-AdvancedSetting -Name “config.vpxd.sso.admin.uri” -Entity $vCenter -Server $vCenter).Value.Split(“/”)[2])
LikeLike