Home Forums Programming Powershell Query local SSMS server group with Powershell? RE: Query local SSMS server group with Powershell?

  • Have you heard of Central Management Server (CMS)? It supports the "interact with each server in a server group from PowerShell" functionality that I think you are after.

    If setting up a CMS is not something you want to begin doing then I would also look into storing the list of servers in a text file and using something like

    foreach ($server in (Get-Content C:\myservers.txt)){Write-Host $server;}

    or something similar with the servers stored in a utility database somewhere instead of a text file.

    There are no special teachers of virtue, because virtue is taught by the whole community.
    --Plato