https://stackoverflow.com/questions/61397665/batch-file-to-get-all-available-graphics-...les-and-output

I previously managed to do this thanks to above link that uses the now depreceated WMIC.

Any ideas on how to do using powershell?

Thanks.


The nearest I could find searching was this ...

But how to put result into a batch file variable ?


https://lindevs.com/methods-to-get-available-gpu-devices-on-windows

C:\> $gpu = (Get-WmiObject Win32_VideoController).Name
C:\> $gpu
Intel(R) UHD Graphics 620

C:\> $gpu -like "Intel"
False

C:\> $gpu -like "*Intel*"
True

C:\> $gpu -like "Intel*"
True