Automation

 View Only
  • 1.  Domain information of the ESXi hosts

    Posted Jul 31, 2024 10:41 AM

    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?



  • 2.  RE: Domain information of the ESXi hosts

    Posted Jul 31, 2024 12:29 PM
    Edited by LucD Jul 31, 2024 05:44 PM

    You could try

    Get-VMHost | Get-VMHostAuthentication |
    Select @{N='VMHostName';E={$_.VMHost.Name}},*



    ------------------------------


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


    ------------------------------



  • 3.  RE: Domain information of the ESXi hosts

    Posted Jul 31, 2024 05:27 PM
    Edited by Zachary Murphy Jul 31, 2024 05:30 PM

    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.