You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: public/Remove-DbaCredential.ps1
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -106,7 +106,7 @@ function Remove-DbaCredential {
106
106
end {
107
107
# We have to delete in the end block to prevent "Collection was modified; enumeration operation may not execute." if directly piped from Get-DbaCredential.
108
108
foreach ($dbCredentialin$dbCredentials) {
109
-
if ($PSCmdlet.ShouldProcess($dbCredential.Parent.Parent.Name,"Removing the SQL credential $($dbCredential.Name) on $($dbCredential.Parent.Parent.Name)")) {
109
+
if ($PSCmdlet.ShouldProcess($dbCredential.Parent.Name,"Removing the SQL credential $($dbCredential.Name) on $($dbCredential.Parent.Name)")) {
110
110
$output= [PSCustomObject]@{
111
111
ComputerName=$dbCredential.ComputerName
112
112
InstanceName=$dbCredential.InstanceName
@@ -120,7 +120,7 @@ function Remove-DbaCredential {
120
120
$output.Status="Dropped"
121
121
$output.IsRemoved=$true
122
122
} catch {
123
-
Stop-Function-Message "Failed removing the SQL credential $($dbCredential.Name) on $($dbCredential.Parent.Parent.Name)"-ErrorRecord $_
123
+
Stop-Function-Message "Failed removing the SQL credential $($dbCredential.Name) on $($dbCredential.Parent.Name)"-ErrorRecord $_
0 commit comments