I am getting reports that the SCSI pass-thru for IDE drives been
disabled in Windows 2003 Server. I would like to add another
method for getting the hard drive info to my DiskID32 tool
http://www.winsim.com/diskid32/diskid32.html .
Thanks,
Lynn McGuire
set svc = getobject ("winmgmts:root\cimv2")
set objEnum = svc.execQuery ("select * from win32_physicalMedia")
for each obj in objEnum
wscript.echo obj.GetObjectText_
next
--
[MS] Scott McNairy
WMI Test Engineer
This posting is provided "As Is" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Lynn McGuire" <win...@winsim.com> wrote in message
news:euo6LL%23eDH...@TK2MSFTNGP11.phx.gbl...
Does one have to have administrator access in order for this
to work ?
Thanks,
Lynn McGuire
You can go here to configure WMI security explicitly
right click "my computer" >> select "manage" >> Expand "Services and
Applications" >> select "WMI Control" >> Right click and select "Properties"
>> select "Security" tab >> expand and add remote enable and whatever other
privileges you need to which user you want to be able to access the
namespaces.
--
[MS] Scott McNairy
WMI Test Engineer
This posting is provided "As Is" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Lynn McGuire" <win...@winsim.com> wrote in message
news:eBG5HFJf...@TK2MSFTNGP11.phx.gbl...
thanks!
Brad
CODE:
Dim strComputer
Dim strNameSpace
Dim strMoniker 'the string that vbscripts GetObject function will
use
Dim refServices 'a reference to a WMI object
strComputer = "dell16" ' Name of REMOTE COMPUTER
strNameSpace = "\root\CIMv2"
' ----------------------------------
' This portion builds the moniker string
' * Use the DCOM Impersonation level
' > anonymous, identify, impersonate, delegate
' * Use the DCOM Authentication level
' > default, none, connect, call, pkt, pktIntegrity, pktPrivacy
' * Use the DCOM Privileges
' > security, shudown...
' ----------------------------------
strMoniker = "WinMgmts:{impersonationLevel=impersonate," & _
"authenticationLevel=connect, " & _
"(security)}!\\" & _
strComputer & _
strNameSpace
Set refServices = GetObject(strMoniker)
' << -------------- Retrieve Instances of Win32_Process's
----------------- >>
Dim strWQL
strWQL = "SELECT * FROM Win32_Process"
Set objCol = refServices.ExecQuery(strWQL)
' loop to enumerate the object collection
For Each obj In objCol
t = t & obj.name & vbnewline
Next
msgbox t
' << ----------------------------------------------------------------------
>>
' [ free object ]
Set refServices = Nothing
Set objCol = Nothing
END CODE
"[MS] Scott McNairy" <sco...@online.microsoft.com> wrote in message news:<3f678184$1...@news.microsoft.com>...
You can work around this by using the ConnectServer method which allows you
to specify a username and password. For example,
set lctr = CreateObject("WbemScripting.SWbemLocator")
set svc = lctr.ConnectServer("remotemachine", "root\cimv2", sUser,
sPassword)
... do stuff
--
[MS] Scott McNairy
WMI Test Engineer
This posting is provided "As Is" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"BradUDA" <bknu...@uda1.com> wrote in message
news:3843d868.03092...@posting.google.com...