Skip to content

Add recursive link crawling and query execution through link chains#2108

Open
mverschu wants to merge 2 commits intofortra:masterfrom
mverschu:master
Open

Add recursive link crawling and query execution through link chains#2108
mverschu wants to merge 2 commits intofortra:masterfrom
mverschu:master

Conversation

@mverschu
Copy link

  • Add crawl_links command to recursively discover all linked servers
  • Add query_link command to execute queries through link paths or server instances
  • Add xp_cmdshell_link command to execute commands through link paths or server instances
  • Support automatic path discovery and execution on all discovered paths
  • Support targeting specific servers by instance name
  • Use OPENQUERY instead of EXEC AT for better compatibility (no RPC required)
  • Improve output formatting for xp_cmdshell results (filter NULLs, clean display)
  • Match PowerUpSQL's Get-SQLServerLinkCrawl functionality

- Add crawl_links command to recursively discover all linked servers
- Add query_link command to execute queries through link paths or server instances
- Add xp_cmdshell_link command to execute commands through link paths or server instances
- Support automatic path discovery and execution on all discovered paths
- Support targeting specific servers by instance name
- Use OPENQUERY instead of EXEC AT for better compatibility (no RPC required)
- Improve output formatting for xp_cmdshell results (filter NULLs, clean display)
- Match PowerUpSQL's Get-SQLServerLinkCrawl functionality
…lback

- Add enable_xp_cmdshell_link command to enable xp_cmdshell through link paths
- Add disable_xp_cmdshell_link command to disable xp_cmdshell through link paths
- Support automatic OPENQUERY fallback when RPC is not enabled on linked servers
- Fix error detection to properly check lastError and replies for RPC errors
- Use EXEC AT for sp_configure commands, fallback to OPENQUERY when RPC unavailable
- Support targeting specific servers by instance name
@anadrianmanrique anadrianmanrique added the in review This issue or pull request is being analyzed label Feb 5, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

in review This issue or pull request is being analyzed

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants