PowerTip: Add network adapter to packet capture session

Doctor Scripto

Summary: Learn to use Windows PowerShell to add a network adapter to a capture session.

Hey, Scripting Guy! Question How can I use Windows PowerShell to add a network adapter to a packet capture session?

Hey, Scripting Guy! AnswerUse the Add-NetEventNetworkAdapter cmdlet and specify the name of the adapter. In the following example, I create a network capture session, add a provider, and then add the network adapter:

PS C:\>New-NetEventSession -Name “Session38”

PS C:\> Add-NetEventPacketCaptureProvider -SessionName “Session38”

PS C:\> Add-NetEventNetworkAdapter -Name “Ethernet01”

0 comments

Discussion is closed.

Feedback usabilla icon