0

I have a jump\terminal server to administer 100 SQL Servers and want to evaluate my locally created policies across all the servers by using the Central Management Server but WITHOUT:

  1. creating the policies on the target servers and
  2. using the SSMS.

I need it to be run either with Powershell or T-SQL, doesn't really matter. I was trying to achieve this by iterating through a CSV file for each line holding the hostnames or by querying msdb.dbo.sysmanagement_shared_registered_servers system table but so far no luck. Any way to accomplish this feat?

Stackoverflowuser
  • 1,550
  • 3
  • 27
  • 42

1 Answers1

1

You can use the Invoke-PolicyEvaluation cmdlet to evaluate a policy stored as an XML file. This requires the SqlServer PowerShell module.

HandyD
  • 10,432
  • 1
  • 13
  • 27