Posted April 29, 20222 yr I have created this small script to enable monitoring of the active network adapter on a given machine. Hope this can be of some help for others in the forum. $activeadapter = Get-NetAdapter | Where-Object {$_.status -EQ "UP" -and $_.HardwareInterface -and $_.Name -notlike "*npcap*"} | select DeviceID $DeviceID = $activeadapter.DeviceID Set-ItemProperty "HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\NetworkInterfaces\" -Name count -Value 1 Set-ItemProperty "HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\NetworkInterfaces\" -Name service0 -Value "$DeviceID" Â
April 29, 20222 yr Administrators 1 hour ago, Rasmus Tved said: I have created this small script to enable monitoring of the active network adapter on a given machine. Hope this can be of some help for others in the forum. $activeadapter = Get-NetAdapter | Where-Object {$_.status -EQ "UP" -and $_.HardwareInterface -and $_.Name -notlike "*npcap*"} | select DeviceID $DeviceID = $activeadapter.DeviceID Set-ItemProperty "HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\NetworkInterfaces\" -Name count -Value 1 Set-ItemProperty "HKLM:\SOFTWARE\MMSOFT Design\PC Monitor\NetworkInterfaces\" -Name service0 -Value "$DeviceID"  I have recently built a similar script but mine doesn't ignore NPCAP, feel free to issue a pull request to change it: https://github.com/paulcsiki/pulseway-scripts/blob/main/enroll-network-interfaces/enroll-network-interfaces.ps1 -Paul
Create an account or sign in to comment