Skip to content

Commit 0e135dd

Browse files
Remove-DbaNetworkCertificate - Fix output of RemovedThumbprint (dataplat#7836)
1 parent 92ec7d1 commit 0e135dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

functions/Remove-DbaNetworkCertificate.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -115,15 +115,15 @@ function Remove-DbaNetworkCertificate {
115115
$vsname = $args[3]
116116

117117
$regPath = "Registry::HKEY_LOCAL_MACHINE\$($regRoot)\MSSQLServer\SuperSocketNetLib"
118-
$cert = (Get-ItemProperty -Path $regPath -Name Certificate).Certificate
118+
$thumbprint = (Get-ItemProperty -Path $regPath -Name Certificate).Certificate
119119
Set-ItemProperty -Path $regPath -Name Certificate -Value $null
120120

121121
[pscustomobject]@{
122122
ComputerName = $env:COMPUTERNAME
123123
InstanceName = $instanceName
124124
SqlInstance = $vsname
125125
ServiceAccount = $serviceAccount
126-
RemovedThumbprint = $cert.Thumbprint
126+
RemovedThumbprint = $thumbprint
127127
}
128128
}
129129

0 commit comments

Comments
 (0)