File tree Expand file tree Collapse file tree 1 file changed +2
-3
lines changed
Source/NETworkManager.Models/Resources Expand file tree Collapse file tree 1 file changed +2
-3
lines changed Original file line number Diff line number Diff line change @@ -188,7 +188,7 @@ function Invoke-DiscoveryProtocolCapture {
188188
189189 try {
190190 $CimSession = @ {
191- CimSession = New-CimSession - ComputerName $Computer - ErrorAction Stop
191+ CimSession = New-CimSession - ComputerName $Computer - ErrorAction Stop
192192 }
193193 } catch {
194194 Write-Warning " Unable to create CimSession. Please make sure WinRM and PSRemoting is enabled on $Computer ."
@@ -197,7 +197,6 @@ function Invoke-DiscoveryProtocolCapture {
197197
198198 $PSSession = @ {
199199 Session = New-PSSession - ComputerName $Computer
200-
201200 }
202201 }
203202
@@ -252,7 +251,7 @@ function Invoke-DiscoveryProtocolCapture {
252251 LinkLayerAddress = $LinkLayerAddress
253252 }
254253
255- Add-NetEventPacketCaptureProvider @PacketCaptureParams | Out-Null
254+ Add-NetEventPacketCaptureProvider @PacketCaptureParams @CimSession | Out-Null
256255 Add-NetEventNetworkAdapter - Name $Adapter.Name - PromiscuousMode $True @CimSession | Out-Null
257256
258257 Start-NetEventSession - Name $SessionName @CimSession
You can’t perform that action at this time.
0 commit comments