如何使用WMIC连接到远程机器并将操作系统信息输出到文件?

我想知道如何使用WMIC连接到远程主机,并将其PC的操作系统信息(安装程序列表)输出到文件。

我试过了

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

但我得到错误"Node - <IP> Error: Description = Invalid query"

但其实,我想我需要成为域pipe理员的权限。 所以我试了

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

我得到错误: Invalid Global switch.

我想通过使用WMIC获取PC的所有操作系统信息(安装的程序列表)。 (我想我需要与域pipe理员访问因为所有的PC都join域),我是一个pipe理员

请…帮我ㅠ____ㅠ啊,当我用我的电脑试过的时候,似乎没问题。

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

WMIC OS获取名称,供应商版本>> C:\%计算机名%.txt

如果我喜欢上面,可以得到txt文件。 但我想远程所有的电脑,并获得一个信息文件… @ _ @ ~~~~

多一个问题>>是否与安全策略或组策略相关? 或防火墙的东西………. @ _ @ @ ;;

os get vendor – 没有这样的事情作为操作系统供应商,这是invalid query来自何处。 查看可用的属性 – 有一个版本,但没有供应商:

 C:\>wmic os get /? Property get operations. USAGE: GET [<property list>] [<get switches>] NOTE: <property list> ::= <property name> | <property name>, <property list> The following properties are available: Property Type Operation ======== ==== ========= BootDevice N/AN/A BuildNumber N/AN/A BuildType N/AN/A CSDVersion N/AN/A CSName N/AN/A CodeSet N/AN/A CountryCode N/AN/A CurrentTimeZone N/AN/A Debug N/AN/A Description N/AN/A Distributed N/AN/A EncryptionLevel N/AN/A ForegroundApplicationBoost N/AN/A FreePhysicalMemory N/AN/A FreeSpaceInPagingFiles N/AN/A FreeVirtualMemory N/AN/A InstallDate N/AN/A LastBootUpTime N/AN/A LocalDateTime N/AN/A Locale N/AN/A Manufacturer N/AN/A MaxNumberOfProcesses N/AN/A MaxProcessMemorySize N/AN/A Name N/AN/A NumberOfLicensedUsers N/AN/A NumberOfProcesses N/AN/A NumberOfUsers N/AN/A OSLanguage N/AN/A OSProductSuite N/AN/A OSType N/AN/A Organization N/AN/A OtherTypeDescription N/AN/A PlusProductID N/AN/A PlusVersionNumber N/AN/A Primary N/AN/A QuantumLength N/AN/A QuantumType N/AN/A RegisteredUser N/AN/A SerialNumber N/AN/A ServicePackMajorVersion N/AN/A ServicePackMinorVersion N/AN/A SizeStoredInPagingFiles N/AN/A Status N/AN/A SystemDevice N/AN/A SystemDirectory N/AN/A SystemDrive N/AN/A TotalSwapSpaceSize N/AN/A TotalVirtualMemorySize N/AN/A TotalVisibleMemorySize N/AN/A Version N/AN/A WindowsDirectory N/AN/A 

在wmic中也没有/DOMAIN选项。

 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. 

你可以尝试:

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

它会提示input你的密码。