From d660e076fb241002123233f0b6496ad7bc3ff827 Mon Sep 17 00:00:00 2001 From: missing0x00 Date: Thu, 10 Jul 2025 22:00:06 -0500 Subject: [PATCH] Return full SPN data when CheckMgmt is used Removes the Select-Object commands from the `Get-SQLInstanceDomain -CheckMgmt` results. These cause all other properties to be removed, losing valuable info such as SPN and DomainAccount. --- PowerUpSQL.ps1 | 2 -- 1 file changed, 2 deletions(-) diff --git a/PowerUpSQL.ps1 b/PowerUpSQL.ps1 index c4f4acd..f064bfa 100644 --- a/PowerUpSQL.ps1 +++ b/PowerUpSQL.ps1 @@ -16392,10 +16392,8 @@ Function Get-SQLInstanceDomain { Write-Verbose -Message 'Parsing SQL Server instances from the UDP scan...' $Tbl1 = $TblMgmtSQLServers | - Select-Object -Property ComputerName, Instance | Sort-Object -Property ComputerName, Instance $Tbl2 = $TblSQLServerSpns | - Select-Object -Property ComputerName, Instance | Sort-Object -Property ComputerName, Instance $Tbl3 = $Tbl1 + $Tbl2