How can I get DirectX version of a system using powershell?

Is it possible to get the DirectX Version and Display Model (WDDM version) using powershell, I can get the information using dxdiag (DirectX Diagnostic Tool).

Please help…

Tarun,
welcome to the forum.

dxdiag has the option to save the output to a file. You can read and parse this file with PowerShell to determine the desired information.

Run

dxdiag /?

on a command line to see all possible arguments.