Чтобы добавлять сообщения и комментарии, .

@k1lg0reTr0ut:
k1lg0reTr0ut

разобрался.
ужасная жопа

@k1lg0reTr0ut:
k1lg0reTr0ut

ну почему блять когда говорят о WMI сразу переходят к ебаным скриптам??? при этом с призказкой: "удобнее всего это показать на пример скрипта".
мне нужно научиться делать запрос сразу, без ебаных скриптов, из командной строки. просто получить один результат и идти дальше.
бляди

@alex0b:
alex0b

State — The current state of the resource group.
Data type: uint32 . The following are the possible values: StateUnknown (-1), ...

Ну да, действительно.

@k1lg0reTr0ut:
k1lg0reTr0ut

как мне создать wmi запрос, который будет выполняться на локальном компьютере, но смотреть поле описания этого компьютера в Active Directory?

@Dant:
Dant

Rebuild & Repair WMI Repository:

pastebin.com
pastebin.com

@pc:
pc

lodctr /R

---------------------------
Элемент управления системного монитора
---------------------------
Не удалось добавить эти счетчики:

\Memory\Available MBytes \Memory\% Committed Bytes In Use
\Memory\Cache Faults/sec
\Memory\Cache Faults/sec
\PhysicalDisk(*)\% Idle Time
\PhysicalDisk(*)\Avg. Disk Queue Length
\Network Interface(*)\Bytes Total/sec
---------------------------
ОК
---------------------------

@pc:
pc

Ccmclean.exe
net stop winmgmt
rename Windows\system32\wbem\repository
net start winmgmt
rundll32 wbemupgd, RepairWMISetup
ccmsetup.exe

@Gem:
Gem

Чаще всего бывает на 7ке и на серверных версиях
[wmi/wmic.c:196:main()] ERROR: Login to remote object.
NTSTATUS: NT code 0x80041003 — NT code 0x80041003

This error relates to the WMI Permissions & is resolved by implementing technet.microsoft.com Check to see that the ZenWMI users has Enable Account & Remote Enable access to the CIMV2 namespace in WMI Control on the server

@Dant:
Dant

Про WMI:
sysengineering.ru
msdn.microsoft.com

@pakan:
pakan

cacti
для наблюдения за очередью процессора в windows можно пользовать Win32_PerfFormattedData_PerfOS_System — он включает метрику uint32 ProcessorQueueLength

msdn.microsoft.com

@pc:
pc

Rebuilding the WMI Repository
If you experience behavior when using WMI, such as application errors or scripts that used to work are no longer working, you may have a corrupted WMI repository. To fix a corrupted WMI repository, use these steps:

Windows XP and Windows Vista
Click Start, Run and type CMD.EXE

Note: In Windows Vista, you need to open an elevated Command Prompt window. To do so, click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.

Type this command and press Enter:

net stop winmgmt

Using Windows Explorer, rename the folder %windir%\System32\Wbem\Repository. (For example, %windir%\System32\Wbem\Repository_bad). %windir% represents the path to the Windows directory, which is typically C:\Windows.

Switch to Command Prompt window, and type the following and press ENTER after each line:

net start winmgmt

EXIT

Courtesy: The above is excerpted from Microsoft Technet article WMI Isn't Working!
© 2007 Microsoft Corporation. All rights reserved.

For Windows XP Service Pack 2
Click Start, Run and type the following command:

rundll32 wbemupgd, UpgradeRepository

This command is used to detect and repair a corrupted WMI Repository. The results are stored in the setup.log (%windir%\system32\wbem\logs\setup.log) file.

For Windows Vista
Open an elevated Command Prompt window. To do so, click Start, click All Programs, click Accessories, right-click Command Prompt, and then click Run as administrator.

Type the following command:

winmgmt /salvagerepository

The above command Performs a consistency check on the WMI repository, and if an inconsistency is detected, rebuilds the repository. The content of the inconsistent repository is merged into the rebuilt repository, if it can be read.

For Windows Server 2003
Use the following command to detect and repair a corrupted WMI Repository:

rundll32 wbemupgd, RepairWMISetup

Re-registering the WMI components (Ref WMI FAQ)
The .DLL and .EXE files used by WMI are located in %windir%\system32\wbem. You might need to re-register all the .DLL and .EXE files in this directory. If you are running a 64-bit system you might also need to check for .DLLs and .EXE files in %windir%\sysWOW64\wbem.

To re-register the WMI components, run the following commands at the command prompt:

•cd /d %windir%\system32\wbem
•for %i in (*.dll) do RegSvr32 -s %i
•for %i in (*.exe) do %i /RegServer

@pakan:
pakan

примеры и cfc для работы с wmi через coldfusion: communitymx.com

пример моего использования:

<cfcomponent>
<cfset variables.wmi = createObject( "component", "wmi" ).init()/>

<cffunction name="getResourcesStats" access="remote" returntype="array">
<cfset cpu = variables.wmi.execQuery("Win32_PerfFormattedData_PerfOS_Processor") />
<cfset mem = variables.wmi.execQuery("Win32_PerfRawData_PerfOS_Memory") />
<cfset res = cpu/>
<cfset ArrayAppend(res, mem[1])>

<cfreturn res>
</cffunction>

</cfcomponent>