I use Windows 10 and a D-Link WiFi adapter. I have tried with a TP-Link adapter and the results are similar. On the WiFi adapter I have disabled all protocols except IPv4.
I start the Wireshark capture, connect the Wi-Fi adapter and after a few seconds the captured packets are:
Wireshark: 688 packets captured
Statistics with Powershell:
ifAlias : Wi-Fi 2
InterfaceAlias : Wi-Fi 2
ifDesc : D-Link DWA-182 Wireless AC 1200 USB Adapter(rev.D)
Caption : MSFT_NetAdapterStatisticsSettingData 'D-Link DWA-182 Wireless AC 1200 USB Adapter(rev.D)'
Description : D-Link DWA-182 Wireless AC 1200 USB Adapter(rev.D)
ElementName : D-Link DWA-182 Wireless AC 1200 USB Adapter(rev.D)
InstanceID : {65E2BEC6-47F0-49A3-B0DF-32CC24CD9888}
InterfaceDescription : D-Link DWA-182 Wireless AC 1200 USB Adapter(rev.D)
Name : Wi-Fi 2
Source : 2
SystemName :
OutboundDiscardedPackets : 0
OutboundPacketErrors : 0
RdmaStatistics :
ReceivedBroadcastBytes : 0
ReceivedBroadcastPackets : 0
ReceivedBytes : 1725
ReceivedDiscardedPackets : 0
ReceivedMulticastBytes : 0
ReceivedMulticastPackets : 0
ReceivedPacketErrors : 0
ReceivedUnicastBytes : 1725
ReceivedUnicastPackets : 14
RscStatistics :
SentBroadcastBytes : 608
SentBroadcastPackets : 7
SentBytes : 61688
SentMulticastBytes : 60345
SentMulticastPackets : 657
SentUnicastBytes : 735
SentUnicastPackets : 10
SupportedStatistics : 4163583
PSComputerName :
CimClass : ROOT/StandardCimv2:MSFT_NetAdapterStatisticsSettingData
CimInstanceProperties : {Caption, Description, ElementName, InstanceID...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
After sending a 10 MB file (10485760 bytes) the results are:
Wireshark: 8255 packets captured
Powershell:
Get-NetAdapterStatistics -Name "Wi-Fi 2" | Format-List -Property "*"
ifAlias : Wi-Fi 2
InterfaceAlias : Wi-Fi 2
ifDesc : D-Link DWA-182 Wireless AC 1200 USB Adapter(rev.D)
Caption : MSFT_NetAdapterStatisticsSettingData 'D-Link DWA-182 Wireless AC 1200 USB Adapter(rev.D)'
Description : D-Link DWA-182 Wireless AC 1200 USB Adapter(rev.D)
ElementName : D-Link DWA-182 Wireless AC 1200 USB Adapter(rev.D)
InstanceID : {65E2BEC6-47F0-49A3-B0DF-32CC24CD9888}
InterfaceDescription : D-Link DWA-182 Wireless AC 1200 USB Adapter(rev.D)
Name : Wi-Fi 2
Source : 2
SystemName :
OutboundDiscardedPackets : 0
OutboundPacketErrors : 0
RdmaStatistics :
ReceivedBroadcastBytes : 0
ReceivedBroadcastPackets : 0
ReceivedBytes : 268254
ReceivedDiscardedPackets : 0
ReceivedMulticastBytes : 0
ReceivedMulticastPackets : 0
ReceivedPacketErrors : 0
ReceivedUnicastBytes : 268254
ReceivedUnicastPackets : 4222
RscStatistics :
SentBroadcastBytes : 608
SentBroadcastPackets : 7
SentBytes : 11214855
SentMulticastBytes : 60345
SentMulticastPackets : 657
SentUnicastBytes : 11153902
SentUnicastPackets : 575
SupportedStatistics : 4163583
PSComputerName :
CimClass : ROOT/StandardCimv2:MSFT_NetAdapterStatisticsSettingData
CimInstanceProperties : {Caption, Description, ElementName, InstanceID...}
CimSystemProperties : Microsoft.Management.Infrastructure.CimSystemProperties
Unicast bytes sent according to Powershell: 11153902 - 735 = 11153167
Unicast packets sent according to Powershell: 575 - 10 = 565 packets
Packets sent according to Wireshark: 8255 - 688 = 7567 packets
The number of packets sent according to Wireshark and Powershell is very different. For some reason the reading of packages with Powershell is very small. I am doing something wrong? Thanks.