Reference Guide

'***Declare variables
Dim objWMIService
Dim strComputerName
Dim strNameSpace
Dim strClassName
Dim ColSystem
Dim fso
Dim txtfile
Dim outString
Dim iTKVal
Dim ArrayItem
Dim objInstance
'*** Check that the right executable was used to run the script and that all parameters were passed
If (LCase(Right(WScript.FullName, 11)) = "wscript.exe" ) Or _
(Wscript.Arguments.Count < 1) Then
Call Usage()
WScript.Quit
End If
'*** Initialize variables
Set fso = CreateObject("Scripting.FileSystemObject")
strComputerName = WScript.Arguments(0)
outString = ""
strNameSpace = "root/dcim/sysman"
strClassName = "DCIM_VirtualDiskView"
iTKVal = -1
ArrayItem = 0
'*** Establish a connection to the dcim/sysman namespace
'*** Retrieve the instance of DCIM_ControllerView class
Set objWMIService = GetObject("winmgmts:{impersonationLevel=impersonate," &_
"AuthenticationLevel=pktprivacy}\\" & strComputerName & "\" &_strNameSpace)
371