Skip to content

Get-DbaRegServer - SSMS upgraded from 19.x to 20.1, reading "old" RegisteredServersStore #9347

@MartinBruegger

Description

@MartinBruegger

Verified issue does not already exist?

I have searched and found no existing issue

What error did you receive?

Had an SSMS version 19.x installed with some registered servers, migrated to SSMS 20.1, deleted 2 registered servers - but Get-DbaRegServer still lists those 2 deleted servers.
$file = [Microsoft.SqlServer.Management.RegisteredServers.RegisteredServersStore]::LocalFileStore.DomainInstanceName --> points to file RegSrvr16.xml but SSMS 20.1 seems to use file RegSrvr17.xml
Had to manually update RegSrvr16.xml to get a correct list
Do not see how to fix Get-DbaRegServer.

Regards, Martin

Steps to Reproduce

# provide your command(s) executed pertaining to dbatools
# please include variable values (redacted or fake if needed) for reference

Please confirm that you are running the most recent version of dbatools

Get-InstalledModule -name dbatools

Version Name Repository Description


2.1.14 dbatools PSGallery The community module that enables SQL Server Pros to automate database development and server administration

Other details or mentions

No response

What PowerShell host was used when producing this error

Windows PowerShell (powershell.exe)

PowerShell Host Version

Name Value


PSVersion 5.1.20348.2400
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.20348.2400
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1

SQL Server Edition and Build number

Microsoft SQL Server 2022 (RTM-CU12) (KB5033663) - 16.0.4115.5 (X64) Mar 4 2024 08:56:10 Copyright (C) 2022 Microsoft Corporation Developer Edition (64-bit) on Windows Server 2022 Standard 10.0 (Build 20348: ) (Hypervisor)

.NET Framework Version

PSChildName Version


Client 4.8.04161
Full 4.8.04161
Client 4.0.0.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugs lifetriage requiredNew issue that has not been reviewed by maintainers

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions