r6306: Add simple WMI client test script
authorJelmer Vernooij <jelmer@samba.org>
Tue, 12 Apr 2005 01:14:54 +0000 (01:14 +0000)
committerGerald (Jerry) Carter <jerry@samba.org>
Wed, 10 Oct 2007 18:11:30 +0000 (13:11 -0500)
(This used to be commit 690a7d71d8d7c98d2002ab04c289c57ccac835c4)

testprogs/win32/wmi/echoprocessor.vbs [new file with mode: 0755]

diff --git a/testprogs/win32/wmi/echoprocessor.vbs b/testprogs/win32/wmi/echoprocessor.vbs
new file mode 100755 (executable)
index 0000000..8ce6f7a
--- /dev/null
@@ -0,0 +1,10 @@
+For Each Host In WScript.Arguments\r
+       Set WMIservice = GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & host & "\root\cimv2")\r
+\r
+       Set colsettings = WMIservice.ExecQuery("SELECT * FROM Win32_Processor")\r
+\r
+\r
+       For Each proc In colsettings\r
+               Wscript.Echo(host & ": " & proc.description)\r
+       Next\r
+Next\r