$domain = $env:userdomain
$domain = "dc=$domain,dc=local"
$serverfilter = "{0}*" -f $env:COMPUTERNAME.Substring(0, 'REJK-x-'.Length)

$de = [ADSI] "LDAP://$domain"
$ds = [adsisearcher] $de
$ds.Filter = "(&(objectClass=computer)(name=$serverfilter)(!(description=Failover*)))"
$searchResult = $ds.FindAll()
$servers = foreach($sr in $searchResult) { $sr.Properties['name'][0] }
$serverip = @{}
foreach($s in $servers) { 
    $serverip[$s] = [System.Net.Dns]::GetHostByName($s).AddressList[0].IPAddressToString
}
$ds.Filter = "(&(objectClass=computer)(name=$serverfilter)(description=Failover*))"
$searchResult = $ds.FindAll()
$clusters = foreach($sr in $searchResult) { $sr.Properties['name'][0] }



#$servers | where { $_ -match 'bcm' -or $_ -match 'sps' } | % { "$_ - $($serverip[$_])" }