Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions PowerUpSQL.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -15411,7 +15411,7 @@ Function Get-SQLServerLoginDefaultPw

# Check if instance is in list
$TblResultsTemp = ""
$TblResultsTemp = $DefaultPasswords | Where-Object { $_.instance -eq "$TargetInstance"}
$TblResultsTemp = @($DefaultPasswords | Where-Object { $_.instance -eq "$TargetInstance"})

if($TblResultsTemp){
Write-Verbose "$Instance : Confirmed instance match."
Expand All @@ -15428,8 +15428,8 @@ Function Get-SQLServerLoginDefaultPw
# Grab and iterate username and password
for($i=0; $i -lt $TblResultsTemp.count; $i++){
#Write-Verbose $TblResultsTemp
$CurrentUsername = $TblResultsTemp.username[$i]
$CurrentPassword = $TblResultsTemp.password[$i]
$CurrentUsername = $TblResultsTemp[$i].username
$CurrentPassword = $TblResultsTemp[$i].password
$LoginTest = Get-SQLServerInfo -Instance $instance -Username $CurrentUsername -Password $CurrentPassword -SuppressVerbose
if($LoginTest){

Expand Down