dbatools is a free PowerShell module with over 300 SQL Server administration, best practice and migration commands included.

Please note that documentation and command names may be out of date while we work furiously towards 1.0


Gets all Linked Servers and summary of information from the SQL Servers listed.



To return all Linked Servers for the SQL Server instance DEV01

Get-DbaLinkedServer -SqlInstance DEV01


From PowerShell, execute Get-Help Get-DbaLinkedServer -Detailed for more information on this function.

Source Code

Want to see the source code? View Get-DbaLinkedServer.ps1 on GitHub

Related commands