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 Computer
System One
-
- 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




