Como usar o WMIC para conectar-se à máquina remota e enviar informações do SO para um arquivo?

5

Eu quero saber como usar o WMIC para conectar ao host remoto e exibir as informações do sistema operacional do seu PC (lista de programas instalados) em um arquivo.

Eu tentei

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

mas recebi o erro "Node - <IP> Error: Description = Invalid query"

Mas, na verdade, acho que preciso ser administrador de domínio para permissão. então eu tentei

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

Recebi erro: Invalid Global switch.

Eu quero obter todas as informações do sistema operacional do PC (lista de programas instalados) usando o WMIC. (acho que preciso acessar com a causa do administrador de domínio que todo o PC está associado ao domínio) e sou um administrador

Por favor ... me ajude ㅠ

por PYO 17.06.2016 / 03:00

1 resposta

7

os get vendor - não existe um fornecedor de sistemas operacionais, é de onde vem o invalid query . Veja as propriedades disponíveis - há uma versão, mas nenhum fornecedor:

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/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

E não há nenhuma opção /DOMAIN no wmic.

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.

Você pode tentar:

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

Ele solicitará sua senha.

    
por 17.06.2016 / 04:47

Tags