Page 1 of 1

wmic diskdrive command invalid query

Posted: 2022-Jun-13, 12:52 am
by SweetTasha
wmic diskdrive getName, Manufacturer, Model, InterfaceType, MediaType, SerialNumber
I got this command from an article explaining how to get the volume serial number for my System Hard Drive. I also need to use it for other drives, such as USB flash drives.
Here's an image of the Command Prompt
command invalid query.png[/attachment]

EDIT: I notice that the image does not show that the command Prompt was running as an administrator. I haverun as an administrator and it gets the same error.
TIA for your help.
SweetTasha

Re: wmic diskdrive command invalid query

Posted: 2022-Jun-13, 2:17 pm
by Simon Sheppard
instead of wmic diskdrive getName ...
try wmic diskdrive get Name ...

Re: wmic diskdrive command invalid query

Posted: 2022-Jun-13, 6:11 pm
by SweetTasha
get name fixed it. thanks. SweetTasha