Skip to content

Commit 0065ab6

Browse files
Get-DbaClientProtocol - remove wrong filter (#9805)
1 parent 89ce802 commit 0065ab6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

public/Get-DbaClientProtocol.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ function Get-DbaClientProtocol {
6666
if ( $server.FullComputerName ) {
6767
$computer = $server.FullComputerName
6868
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 -gt 0 } | 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
7070

7171
if ( $namespace.Name ) {
7272
Write-Message -Level Verbose -Message "Getting Cim class ClientNetworkProtocol in Namespace $($namespace.Name) on $computer"

0 commit comments

Comments
 (0)