16 Mar 2018

WMIC /format - Invalid XSL format (or) file name.

You may see an error when using WMIC /format switch, as in the following example where I wanted to write a list of the installed patches on my computer to a CSV file:
wmic /output:"d:\patches.csv" qfe list full /format:csv

But I got this error: Invalid XSL format (or) file name.


Solution
Copy the XSL files as follows:

from
C:\Windows\system32\wbem\en-us\*.xsl
to
C:\Windows\system32\wbem

Once you've done that, when you run the WMIC command with the /format switch, it will work. I have successfully tested this on a Windows 7 computer.


Reference
https://stackoverflow.com/questions/9673057/wmic-error-invalid-xsl-format-in-windows7



No comments: