I want to know how to use WMIC to connect to remote host and output their PC's OS information(Installed programs list) to a file.

I tried

wmic /node: <IP address> OS get vendor, name > c:\output.txt

but i got error "Node - <IP> Error: Description = Invalid query"

But Actually, i think i need to be domain administrator for permission. so i tried

wmic /node: <IP> /domain: <domain.inc> /user:administrator /password:<password> OS get vendor, name > c:\output.txt

I got error: Invalid Global switch.

I want to get all of PC's OS information( installed programs list) by using WMIC. (i think i need to access with domain administrator cause all of PC is joined with domain) and im an administrator

Please...help me ㅠ____ㅠ ah, it seems to be ok when i tried with just my PC.

WMIC /output:C:\%computername%.txt product get name, vendor, version

WMIC OS get name, vendor, version >> C:\%computername%.txt

if i did like above, it is ok to get txt file. but i want to remote all PC and get an information file...@_@~~~~

one more question>> is it connected with Security policy or Group policy something? or Firewall something..........@_@;;


os get vendor - there is no such thing as an OS vendor, that's where the invalid query is coming from. See the available properties - there's a Version, but no Vendor:

C:\>wmic os get /?

Property get operations.

GET [<property list>] [<get switches>]
NOTE: <property list> ::= <property name> | <property name>,  <property list>

The following properties are available:
Property                                Type                    Operation
========                                ====                    =========
BootDevice                              N/A                     N/A
BuildNumber                             N/A                     N/A
BuildType                               N/A                     N/A
CSDVersion                              N/A                     N/A
CSName                                  N/A                     N/A
CodeSet                                 N/A                     N/A
CountryCode                             N/A                     N/A
CurrentTimeZone                         N/A                     N/A
Debug                                   N/A                     N/A
Description                             N/A                     N/A
Distributed                             N/A                     N/A
EncryptionLevel                         N/A                     N/A
ForegroundApplicationBoost              N/A                     N/A
FreePhysicalMemory                      N/A                     N/A
FreeSpaceInPagingFiles                  N/A                     N/A
FreeVirtualMemory                       N/A                     N/A
InstallDate                             N/A                     N/A
LastBootUpTime                          N/A                     N/A
LocalDateTime                           N/A                     N/A
Locale                                  N/A                     N/A
Manufacturer                            N/A                     N/A
MaxNumberOfProcesses                    N/A                     N/A
MaxProcessMemorySize                    N/A                     N/A
Name                                    N/A                     N/A
NumberOfLicensedUsers                   N/A                     N/A
NumberOfProcesses                       N/A                     N/A
NumberOfUsers                           N/A                     N/A
OSLanguage                              N/A                     N/A
OSProductSuite                          N/A                     N/A
OSType                                  N/A                     N/A
Organization                            N/A                     N/A
OtherTypeDescription                    N/A                     N/A
PlusProductID                           N/A                     N/A
PlusVersionNumber                       N/A                     N/A
Primary                                 N/A                     N/A
QuantumLength                           N/A                     N/A
QuantumType                             N/A                     N/A
RegisteredUser                          N/A                     N/A
SerialNumber                            N/A                     N/A
ServicePackMajorVersion                 N/A                     N/A
ServicePackMinorVersion                 N/A                     N/A
SizeStoredInPagingFiles                 N/A                     N/A
Status                                  N/A                     N/A
SystemDevice                            N/A                     N/A
SystemDirectory                         N/A                     N/A
SystemDrive                             N/A                     N/A
TotalSwapSpaceSize                      N/A                     N/A
TotalVirtualMemorySize                  N/A                     N/A
TotalVisibleMemorySize                  N/A                     N/A
Version                                 N/A                     N/A
WindowsDirectory                        N/A                     N/A

And there is no /DOMAIN option in wmic either.

C:\>wmic /?

[global switches] <command>

The following global switches are available:
/NAMESPACE           Path for the namespace the alias operate against.
/ROLE                Path for the role containing the alias definitions.
/NODE                Servers the alias will operate against.
/IMPLEVEL            Client impersonation level.
/AUTHLEVEL           Client authentication level.
/LOCALE              Language id the client should use.
/PRIVILEGES          Enable or disable all privileges.
/TRACE               Outputs debugging information to stderr.
/RECORD              Logs all input commands and output.
/INTERACTIVE         Sets or resets the interactive mode.
/FAILFAST            Sets or resets the FailFast mode.
/USER                User to be used during the session.
/PASSWORD            Password to be used for session login.
/OUTPUT              Specifies the mode for output redirection.
/APPEND              Specifies the mode for output redirection.
/AGGREGATE           Sets or resets aggregate mode.
/AUTHORITY           Specifies the <authority type> for the connection.
/?[:<BRIEF|FULL>]    Usage information.

You could try:

wmic /NODE:"servername" /USER:"yourdomain\administrator" OS GET Name

It will prompt for your password.

  • Thank you. i totally didnt know about this..@_@;;; thank you for your help. now i know how to do ! ! ! – PYO Jun 17 '16 at 4:15

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Not the answer you're looking for? Browse other questions tagged or ask your own question.