How to register an instance as central management server(CMS) server instance using powershell?

Ummer, Fazil 0 Reputation points
2024-05-21T08:46:23.52+00:00

Hi,

Can we automate register Central Management Server using powershell? I'm unable to find any documentation regarding the this?. Rest of the steps are automated through poweshell.

As part of the testing the script I have deleted the registered Central Management Server from SSMS but still able to add the Server groups and register servers to it. Is it expected ?

Windows for business Windows Server User experience PowerShell
SQL Server Other
0 comments No comments
{count} votes

1 answer

Sort by: Most helpful
  1. Ben Miller-(DBADuck) 195 Reputation points MVP
    2024-06-03T03:52:44.2566667+00:00

    You can check here. DBATOOLS module for PowerShell makes it easy to use RegisteredServers.

    https://dbatools.io/commands/#RegisteredServers

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.