computerhighguy
IS-IT--Management
I can get my WMI query to work using the below script. I am pretty sure it loops through everything looking for my one attribute. How can I make this query just the attribute I want to echo it to the screen.
I figure I should be able to a query something like this.
but I am not certain how to make that work. It doesn't seem to be a collection if I use the above OR there is nothing in the collection. Any help is appreciated. Thanks.
It is what it is!!
__________________________________
A+, Net+, I-Net+, Certified Web Master, MCP, MCSA, MCSE, CCNA, CCDA, and few others (I got bored one day)
Code:
Dim objWMI : Set objWMI = GetObject("winmgmts:\\.\root\cimv2")
Dim colSettingsComp : Set colSettings = objWMI.ExecQuery("Select * from MSFT_SIPLogSetting")
Dim objComputer, strModel
For Each objComputer in colSettings
strModel = objComputer.TimeToBeReceived
Next
wscript.echo strModel
I figure I should be able to a query something like this.
Code:
Select * from MSFT_SIPLogSetting WHERE Name = 'TimeToBeReceived'
but I am not certain how to make that work. It doesn't seem to be a collection if I use the above OR there is nothing in the collection. Any help is appreciated. Thanks.
It is what it is!!
__________________________________
A+, Net+, I-Net+, Certified Web Master, MCP, MCSA, MCSE, CCNA, CCDA, and few others (I got bored one day)