Skip to content

Commit

Permalink
Update PowerUpSQL.ps1
Browse files Browse the repository at this point in the history
Fixed Get-SqlDatabaseSchema bug.
  • Loading branch information
nullbind authored May 20, 2024
1 parent c9e8b38 commit a238182
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions PowerUpSQL.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
File: PowerUpSQL.ps1
Author: Scott Sutherland (@_nullbind), NetSPI - 2023
Major Contributors: Antti Rantasaari and Eric Gruber
Version: 1.123
Version: 1.124
Description: PowerUpSQL is a PowerShell toolkit for attacking SQL Server.
License: BSD 3-Clause
Required Dependencies: PowerShell v.2
Expand Down Expand Up @@ -5875,7 +5875,7 @@ Function Get-SQLDatabaseSchema
ON
s.name = i.SCHEMA_NAME
$SchemaNameFilter
ORDER BY schema_name;"
ORDER BY s.name;"

# Execute Query
$TblResults = Get-SQLQuery -Instance $Instance -Query $Query -Username $Username -Password $Password -SuppressVerbose
Expand All @@ -5889,9 +5889,9 @@ Function Get-SQLDatabaseSchema
{
# Return data
if($ShowRoleSchemas){
$TblResults
$TblSchemas
}else{
$TblResults | Where schema_id -lt 1000
$TblSchemas | Where SchemaId -lt 1000
}
}
}
Expand Down

0 comments on commit a238182

Please sign in to comment.