I am new to powershell and have a question. Is there a way to deploy sql scripts to all the databases that are in a registered server in the central management list on sql? I would like to avoid looping thru a list of databases and have the script run on all of them simultaneously like it would if i used the multi script tool.
Also, i have a ps script that i think should give me the servers in my Central Management group but it comes up with nothing even though i have servers registered. Any help would be greatly appreciated.
I am using a remote powershell connection to my support server when running the below.
#import SQL Server module
Import-Module SQLPS -DisableNameChecking
Set-Location "SQLSERVER:\SQLRegistration\Central Management Server Group"
this returns nothing.