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/Get-DbaClientProtocol.ps1
+1-1Lines changed: 1 addition & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -66,7 +66,7 @@ function Get-DbaClientProtocol {
66
66
if ( $server.FullComputerName ) {
67
67
$computer=$server.FullComputerName
68
68
Write-Message-Level Verbose -Message "Getting SQL Server namespace on $computer"
69
-
$namespace=Get-DbaCmObject-ComputerName $computer-Namespace root\Microsoft\SQLServer -Query "Select * FROM __NAMESPACE WHERE Name LIke 'ComputerManagement%'"-ErrorAction SilentlyContinue |Where-Object { (Get-DbaCmObject-ComputerName $computer-Namespace $("root\Microsoft\SQLServer\"+$_.Name) -ClassName ClientNetworkProtocol -ErrorAction SilentlyContinue).count -gt0 } |Sort-Object Name -Descending |Select-Object-First 1
69
+
$namespace=Get-DbaCmObject-ComputerName $computer-Namespace root\Microsoft\SQLServer -Query "Select * FROM __NAMESPACE WHERE Name LIke 'ComputerManagement%'"-ErrorAction SilentlyContinue |Sort-Object Name -Descending |Select-Object-First 1
70
70
71
71
if ( $namespace.Name ) {
72
72
Write-Message-Level Verbose -Message "Getting Cim class ClientNetworkProtocol in Namespace $($namespace.Name) on $computer"
0 commit comments