You can't call an expression VMHost because that already exists. Just do
|select VMHost,Domain,TrustedDomains,DomainMembershipStatus
Edit: there's also no reason to pipe from get-vmhost. Just do get-vmhostauthentication|select *
However, the output in the original post is likely correct. None of your hosts are domain joined.
Original Message:
Sent: Jul 31, 2024 12:29 PM
From: LucD
Subject: Domain information of the ESXi hosts
You could try
Get-VMHost | Get-VMHostAuthentication |Select @{N='VMHost';E={$_.VMHost.Name}},*
------------------------------
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
Original Message:
Sent: Jul 31, 2024 10:41 AM
From: NeenaJim
Subject: Domain information of the ESXi hosts
Hello,
Our ESXi hosts are not connected to the domain. I need to share this report. When I ran this command "Get-VMHost | Get-VMHostAuthentication", it came as this. How can add the ESXi hosts name in the result? Can someone please help?