TechOnTip Weblog

Run book for Technocrats

Find All Domain Joined Hyper-V Virtual Machines

Posted by Brajesh Panda on September 18, 2012

Curtsy Ask the Core Team Blog

Hyper-V Integration service “Hyper-V Heartbeat Service” always create a Service Connection Point (SCP) Object under the Computer Account. This SCP is named as “Windows Virtual Machine”. You will able to see it in ADSI Edit or using Powershell.

This object is used to differentiate the computer object from other Physical computers & virtual machines (created by other platforms). So we can query for this service connection point object, which will give us all Hyper-v Virtual Machine name in domain.

In case the object is deleted, it will be automatically re-created when the VM is restarted or the “Hyper-V Heartbeat Service” is restarted. On each restart of the service or virtual machine the integration service checks if the machine is domain joined and if it is domain joined, it checks if the service Connection Point (SCP) object exists in the domain. If the object doesn’t exist it will attempt to recreate the object.

Get-QADObject -Name ‘Windows Virtual Machine’ -Type serviceConnectionPoint | Get-QADComputer -Identity {$_.ParentContainerDN}


Get-ADObject –LDAPFilter “(&(objectClass=serviceConnectionPoint)(CN=Windows Virtual Machine))”


Get-QADObject –LDAPFilter “(&(objectClass=serviceConnectionPoint)(CN=Windows Virtual Machine))”


dsquery * Domainroot –Filter “(&(objectClass=serviceConnectionPoint)(CN=Windows Virtual Machine))”

In case of Work Group computers we have to use other query methods like WMI; Win32_ComputerSystem Class. Manufacturer property will return Microsoft Corporation & Model property will return “Virtual Machine”

Here is my another post to find out all domain joined hyper-v hosts.


One Response to “Find All Domain Joined Hyper-V Virtual Machines”

  1. […] Find All Domain Joined Hyper-V Virtual Machines […]

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: