VMware Cloud Community
hansoac
Contributor
Contributor
Jump to solution

View Guest Domain Membership

I have been faced with the task of determining what domain our guest machines have been joined to.  We have a few different domains, and don't have a good track record of keeping track of which servers are on what.  The question is: Is there an easy way to extract this information using PowerCLI?  I consulted the help files but did not see anything that was an obvious answer.

Thanks!

Reply
0 Kudos
1 Solution

Accepted Solutions
Akopylov
Commander
Commander
Jump to solution

Hello, hansoac.

You could just get-vm all the vms you need and ".Guest.HostName" it. You wiil get fqdn of vm.

For example:

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $vm=get-

vm Garant

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $vm

Name                 PowerState Num CPUs MemoryGB

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

Garant               PoweredOn  2        4,000

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $vm.Gues

t.HostName

GARANT.mfc22.local

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI>

View solution in original post

Reply
0 Kudos
2 Replies
a_p_
Leadership
Leadership
Jump to solution

Reply
0 Kudos
Akopylov
Commander
Commander
Jump to solution

Hello, hansoac.

You could just get-vm all the vms you need and ".Guest.HostName" it. You wiil get fqdn of vm.

For example:

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $vm=get-

vm Garant

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $vm

Name                 PowerState Num CPUs MemoryGB

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

Garant               PoweredOn  2        4,000

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI> $vm.Gues

t.HostName

GARANT.mfc22.local

PowerCLI C:\Program Files (x86)\VMware\Infrastructure\vSphere PowerCLI>

Reply
0 Kudos