Jump to content

Recommended Posts

Posted

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
Posted
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

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 account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...