VMware Cloud Community
GriAle
Contributor
Contributor
Jump to solution

Guest.HostName on same Linux return only short Hostname

Good day.

Need help

Guest.HostName  on Win, RH, OEL guest OS return full hostname on SuSe and CentOS return only short hostname.

But i need full, how fix it?

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

Does this return the FQDN correctly?
It assumes that the VMware Tools are installed and running.

Get-VM  | where{$_.PowerState -eq 'PoweredOn'} |

Select Name,

    @{n='gUEST os';e={$_.ExtensionData.Guest.gUESTfULLnAME}},

    @{N='FQDN';E={"$($_.ExtensionData.Guest.Ipstack[0].DnsConfig.HostName).$($_.ExtensionData.Guest.Ipstack[0].DnsConfig.DomainName)"}}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

2 Replies
LucD
Leadership
Leadership
Jump to solution

Does this return the FQDN correctly?
It assumes that the VMware Tools are installed and running.

Get-VM  | where{$_.PowerState -eq 'PoweredOn'} |

Select Name,

    @{n='gUEST os';e={$_.ExtensionData.Guest.gUESTfULLnAME}},

    @{N='FQDN';E={"$($_.ExtensionData.Guest.Ipstack[0].DnsConfig.HostName).$($_.ExtensionData.Guest.Ipstack[0].DnsConfig.DomainName)"}}


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

GriAle
Contributor
Contributor
Jump to solution

Thx.

All work correct.

I stop my try search resolve problem on $_.ExtensionData.Guest.Ipstack

0 Kudos