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

http://blogs.msdn.com/opal/archive/2010/04/18/track-sharepoint-2010-installations-by-service-connection-point-ad-marker.aspx

PowerShell
Edit|Remove
#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
$sel.SearchRoot=$root
$adobj=$sel.FindAll()
$adobj | ForEach-Object {$_.Properties.servicebindinginformation}