This script can be used to list all the servers has SharePoint 2010 installed. The container in Active Directory needs to be created before SharePoint 2010 deployment.

For more information on how to setup service connection point container (AD Marker) for SharePoint, please refer to

#Change DC=Contoso; DC=Com to your target domain name

$Dom = 'LDAP://CN=Microsoft SharePoint Products; CN=System; DC=Contoso; DC=Com'
$Root = New-Object DirectoryServices.DirectoryEntry $Dom 
$sel= New-Object DirectoryServices.DirectorySearcher
$adobj | ForEach-Object {$_.Properties.servicebindinginformation}