Rasmus Tved Posted April 29, 2022 Posted April 29, 2022 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" Â
Administrators Paul Posted April 29, 2022 Administrators Posted April 29, 2022 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 Nuno Inácio 1
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now