XP_WMI.zip Extended Sqlserver Procedure for Quering WMI

XP_WMIV3_DLL is a Extended Sqlserver Procedure for Quering WMI. 2012-11-09
This package includes versions for 32-bit and 64-bit SQL servers.

Shareware, free for non comercial use.

Currently tested under SQL-Server 2005 and SQL-Server 2008.


Installation:

EXEC sp_addextendedproc xp_wmiv3, '\XP_WMIV3_DLL.dll'

eg: EXEC sp_addextendedproc xp_wmiv3, 'C:\DLLs\XP_WMIV3_DLL.dll'

Uninstallation

EXEC sp_dropextendedproc xp_wmiv3


Usage

e.g.

exec xp_wmiv3 'SELECT * FROM Win32_Volume'
exec xp_wmiv3 'SELECT * FROM CIM_Userdevice where Name like "%HID%"'



Create table #tmp(Domain varchar(255),Name varchar(255),Sid varchar(255))
insert into #tmp Exec xp_wmiV2 'SELECT Domain,SID,Name FROM Win32_UserAccount where Status ="OK"'
Select * from #tmp
Drop Table #tmp



Be aware that some querys my last very long, some won't return at last.

Covered namespaces in this version depend on local - root\CIMV2

Home







c ca