February 21st, 2016

PowerTip: Add virtual network adapter to packet capture session

Doctor Scripto
Scripter

Summary: Learn how to use Windows PowerShell to add a virtual network adapter to a network packet capture session. Hey, Scripting Guy! Question How can I use Windows PowerShell to add a virtual network adapter to a network packet capture session?

Hey, Scripting Guy! Answer Use the Add-NetEventVmNetworkAdapter cmdlet and specify the name of the adapter. In the following example, I create a net event session, add a capture provider, and then specify the virtual network adapter:

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

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

PS C:\> Add-NetEventVMNetworkAdapter -Name “LargeGuid”

Author

The "Scripting Guys" is a historical title passed from scripter to scripter. The current revision has morphed into our good friend Doctor Scripto who has been with us since the very beginning.

0 comments

Discussion are closed.