Hi Luc,
is there powercli way to find vcenter configurations.
1:whether vcenter is in linked mode
2:whether psc is embedded or external
For the PSC you can do this
$global:DefaultVIServer |
Select Name,
@{N='PSC';E={
$pscUri = Get-AdvancedSetting -Entity $_ -Name config.vpxd.sso.admin.uri | select -ExpandProperty Value
if(([System.Uri]$_.ServiceUri).Host -eq ([System.Uri]$pscUri).Host){'Embedded'}else{'External'}
}}
For linked mode I'm not too sure.
Have to investigate
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
For the PSC you can do this
$global:DefaultVIServer |
Select Name,
@{N='PSC';E={
$pscUri = Get-AdvancedSetting -Entity $_ -Name config.vpxd.sso.admin.uri | select -ExpandProperty Value
if(([System.Uri]$_.ServiceUri).Host -eq ([System.Uri]$pscUri).Host){'Embedded'}else{'External'}
}}
For linked mode I'm not too sure.
Have to investigate
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks Luc.
hi Luc ,
i thought of adding psc value in a table along with other inventory objects using following way.
$psc-=get-AdvancedSetting -Entity $vc -Name config.vpxd.sso.admin.uri|select -ExpandProperty value
$psc_host=[system.uri]$psc
$output|Add-Member -MemberType NoteProperty -Name 'PSC type ' -Value $psc_host.host
but got following error
Cannot convert value
"https://hostname/sso-adminserver/sdk/vsphere-tch.local" to
type "System.Int32". Error: "Input string was not in a correct format."
At C:\Users\in0079d6\Desktop\Technicolor\basicinfr.ps1:52 char:6
+ $psc-=get-AdvancedSetting -Entity $vc -Name config.vpxd.sso.admi ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidArgument: (:) [], RuntimeException
+ FullyQualifiedErrorId : InvalidCastFromStringToInteger
This seems to work for me
$psc = Get-AdvancedSetting -Entity $vc -Name config.vpxd.sso.admin.uri | select -ExpandProperty value
$psc_host = ([system.uri]$psc).Host
}
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Thanks.I am checking it again .