$RegisteredServers = Get-ChildItem “SQLSERVER:\SQLRegistration\Database Engine Server Group”
foreach( $RegSrv in $RegisteredServers)
{
$RegSrv
}
The above code when run in
-
a Machine where only SQL Client is installed and Registered three servers on it (Connect to servers and Register in Sql Management Studio) and the Result is Server A, Server B, Server C which is perfect
but
-
But I go to Server A where SQL Server 64 bit is installed( Registered Server A, Server B and Server C) and ran the above code in PS,then in this case the result is only one Server A and I don’t get Server B and Server C which is wrong
Can Any one help me on this and it would be a great help for me.
Rajkumar