WMIC OS to htmlTable not working

Im trying to export some WMIC to html tables, and Ive managed to get some of the commands to work, such as:-
wmic /output:test.html computersystem list full /format:htable

Open in new window

But when I try is with other objects, such as OS:-
wmic /output:test.html os list full /format:htable

Open in new window

I get the message:-

Description = Invalid query

Any ideas how I can use the OS record and get it into a html table?

Thank you in advance
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

slightwv (䄆 Netminder) Commented:
Mark WillsTopic AdvisorCommented:
try : wmic /output:test.html os get * /format:htable
Mark WillsTopic AdvisorCommented:

the alias "OS" needs to use the get verb, not the list verb to retrieve the objects for that alias.

it is confusing, because you can do:
wmic OS list full /format /?

Open in new window

and it does show that htable is an option, but alas, not for the list verb.

the more formal way (instead of * ) is:
wmic /output:test.html os get /all /format:htable

Open in new window

So, it is possible, just need to check the options before hand - they can be quite different for each alias

You can always get a list of properties - with the available switches using the GET verb :
wmic OS get/?

Open in new window

And there you will find (finally) that the /FORMAT switch is available to use....

Hope that helps.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
Mark WillsTopic AdvisorCommented:
Hello ?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Operating Systems

From novice to tech pro — start learning today.