microsoft / SQLServerPSModule

This repo is the home of SQL Server PowerShell Module development.
MIT License
45 stars 1 forks source link

SQLRegistration does not work with SSMS 20.0 and SqlServer module 22.2.0 #77

Closed PeterPorsche closed 4 hours ago

PeterPorsche commented 3 months ago

I can add a new item to the "PS SQLSERVER:\SQLRegistration\Database Engine Server Group" but the new item does not show up in SSMS 20.0 "Registerd Servers"

example: New-Item -Name $(encode-sqlname 'test_reg_server') -ItemType Registration -Value ("Server=TestServer; Database=test_database; Integrated Security=true");

jeffalope commented 1 month ago

Ran into this issue as well. I think the issue is that the dll: Microsoft.SqlServer.Management.RegisteredServers.dll which I think has references specific for ssms 19.

Matteo-T commented 1 month ago

Interesting. This could be tricky to fix/address because I cannot think of away (at least today) to differenciate between 19 and 20. I'll check with the SMO owner and see what we can do about it.

Or maybe I can look at trying to update both (from the PS Provider): whichever is there, I update it. Uhm... I need to take a closer look at the code and see...

Matteo-T commented 4 days ago

I've bumped the upcoming version v22.3 to the latest SMO, so once it's released it should switch to the new SSMS 20 stuff. I cannot think of a simple way to support both at the same time and, hopefully, the bump 19->20 was a fairly isolated case.

Matteo-T commented 4 hours ago

Can you try v22.3.0 and confirm that the SSMS20 servers are OK now? I can't have both 19 and 20...