Skip to content

Commit

Permalink
Fixed usage of $runspaceId (#7247)
Browse files Browse the repository at this point in the history
  • Loading branch information
andreasjordan authored Apr 18, 2021
1 parent 88a77bd commit 51ce03b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions internal/functions/Invoke-Command2.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ function Invoke-Command2 {
$runspaceId = [System.Management.Automation.Runspaces.Runspace]::DefaultRunspace.InstanceId
# sessions with different Authentication should have different session names
if ($ConfigurationName) {
$sessionName = "dbatools_$($Authentication)_$($ConfigurationName)_$runspaceId_$($ComputerName.ComputerName)"
$sessionName = "dbatools_$($Authentication)_$($ConfigurationName)_$($runspaceId)_$($ComputerName.ComputerName)"
} else {
$sessionName = "dbatools_$($Authentication)_$runspaceId_$($ComputerName.ComputerName)"
$sessionName = "dbatools_$($Authentication)_$($runspaceId)_$($ComputerName.ComputerName)"
}

# Retrieve a session from the session cache, if available (it's unique per runspace)
Expand Down

0 comments on commit 51ce03b

Please sign in to comment.