Improper Results When Using SQLSERVER PS Provider.

Welcome Forums General PowerShell Q&A Improper Results When Using SQLSERVER PS Provider.

This topic contains 1 reply, has 2 voices, and was last updated by

 
Keymaster
1 year, 1 month ago.

  • Author
    Posts
  • #82049

    Participant
    Points: 0
    Rank: Member

    $RegisteredServers = Get-ChildItem "SQLSERVER:\SQLRegistration\Database Engine Server Group"

    foreach( $RegSrv in $RegisteredServers)
    {
    $RegSrv
    }

    The above code when run in

    1. 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

    2. 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

  • #82130

    Keymaster
    Points: 1,625
    Helping HandTeam Member
    Rank: Community Hero

    This is really more of a SQL Server question, and you might ask someplace like StackOverflow, but my guess is that the server isn't running the client software, and so it doesn't “see” the other servers on the network.

The topic ‘Improper Results When Using SQLSERVER PS Provider.’ is closed to new replies.