wmic process get /format:csv
What is wrong with this command in Windows 7?
I get:
Invalid XSL format (or) file name.
It's a bug in the wmic command. It's been suggested to copy XSL files into the %WINDIR%\system32 (or equivalent if 64 bit.) However, the command below works just as well without the need to copy files:
wmic process get ProcessId,Description,CommandLine,ExecutablePath,ParentProcessId /format:"%WINDIR%\System32\wbem\en-us\csv"
Of course, the "en-us" will be different for different locales.
If you want to redirect output to a file add a switch /output:"your filename here" before the process keyword
This is a bug in Windows 7 and Windows Server 2008 (also R2) WMIC. When you use (for example) Dutch regional settings in an English Windows installation, WMIC searches for the xsl files inside C:\Windows\System32\wbem\nl-NL
, instead of C:\Windows\System32\wbem\en-US
where they are.
Workarounds:
C:\Windows\system32\wbem\en-US\*.xsl
files up into the C:\Windows\system32\wbem\
folder.WMIC process get /format:"%WINDIR%\System32\wbem\en-US\csv"
.If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With