Interesting. Since I've got it coded your way I'll keep it even if it were less efficient. That code is trivial compared with the rest of the stuff the .bat files do.I ran each 1,000 times. The(Get-CimInstance...).DeviceIDmethod ran an average of 6.1583 ms (range : 4.8111 to 117.9035 ms). TheSelect-Objectmethod ran an average of 5.7888 ms (range : 4.8333 to 20.7353 ms).
My Computers
-
At a glance
Windows 11Intel Core i5-840016GBIntel UHD Graphics 630- OS
- Windows 11
- Computer type
- PC/Desktop
- Manufacturer/Model
- Microsoft
- CPU
- Intel Core i5-8400
- Motherboard
- ASUS PRIME H370-PLUS
- Memory
- 16GB
- Graphics Card(s)
- Intel UHD Graphics 630
- Sound Card
- On board
- Monitor(s) Displays
- Samsung SyncMaster 2043BWX
- Screen Resolution
- 1680 x 1050
- Hard Drives
- Samsung SSD 850 256GB
WDC 1TB NVMe
WD 3TB external USB drive
- PSU
- I don't remember
- Case
- Corsair something-or-other
- Cooling
- Air CPU + 2 case fans
- Keyboard
- DAS S Pro (Cherry Brown)
- Mouse
- Logitech USB of some sort
-
At a glance
Windows 10 21H1i5-840016GBon board- Operating System
- Windows 10 21H1
- Computer type
- PC/Desktop
- Manufacturer/Model
- Homegrown
- CPU
- i5-8400
- Motherboard
- ASUS PRIME H370-PLUS
- Memory
- 16GB
- Graphics card(s)
- on board
- Sound Card
- on board
- Monitor(s) Displays
- Samsung SyncMaster 2043 BWX
- Screen Resolution
- 1280 x 1024
- Hard Drives
- Samsung SSD 850 EVO 250GB, WDS100T3X0C-00SJG0
- PSU
- don't remember
- Case
- Corsair Carbide 100r
- Cooling
- stock
- Keyboard
- DAC something or other
- Mouse
- Logitech M-U-0007
- Internet Speed
- 80/6 Mbs
- Browser
- FireFox
- Antivirus
- Kaspersky Internet security




