Get serial number of usb storage device in .net core 2.1
问题 How can I get the serial number of usb storage device in .net core 2.1 ? I found different solutions, but sadly they don\'t work due the lack of windows registry and wmi in .net core. In Powershell it really simple, but I wasn\'t able to find a implementation in Powershell Core. PS C:\\> Get-Disk | Select-Object SerialNumber SerialNumber ------------ 0008_0D02_0021_9852. I prefer a solution with no extra installs on the clients (Win, Linux, Mac). 回答1: This Class performs a series of queries