StumpedTechy
MIS
I now have my WMI query for the patch setup! Now I was asked to do something I am unfamiliar with.
I have a list of Machine Names compiled from AD, I have a list of MB serial numbers.
I know WMI_Bios holds the serial number in the SerialNumber number field. Is there any way I make the query aginst a list of serial numbers?
What I need is to get all computers in AD that have a bank serial number OR are on the list of serial numbers I was given
E.G. something like -
Set colSerialNumber = objWMIService.ExecQuery _
("Select SerialNumber from Win32_Bios Where SerialNumber = 'Some list?'")
If colHotfix.Count = 0 Then
objFileOutput.WriteLine strDeviceName & ",This computer has no programmed serial number."
The other thing is I need this same query to also give me back the last logged on user so we can try and locate the PC.
The question there is can I get the Last logged on user in the same query as the bios to have a single output line?
Something like -
("Select SerialNumber from Win32_Bios AND Username from Win32_ComputerSystem Where SerialNumber = 'Some list?'")
I know this is getting too complex for me as I am not familiar with WMI querying.
Basically I need 3 things - Machine name (one on our domain), last logged on user, and serial number off list I have OR a blank serial number (as the blank ones we have to go program).
Thanks for putting up with me guys your helping me learn alot about VBScripting and its uses. I now have a library of over 40 scripts developed and were running a good 10 of them almost weekly in production
Yeay you!
I have a list of Machine Names compiled from AD, I have a list of MB serial numbers.
I know WMI_Bios holds the serial number in the SerialNumber number field. Is there any way I make the query aginst a list of serial numbers?
What I need is to get all computers in AD that have a bank serial number OR are on the list of serial numbers I was given
E.G. something like -
Set colSerialNumber = objWMIService.ExecQuery _
("Select SerialNumber from Win32_Bios Where SerialNumber = 'Some list?'")
If colHotfix.Count = 0 Then
objFileOutput.WriteLine strDeviceName & ",This computer has no programmed serial number."
The other thing is I need this same query to also give me back the last logged on user so we can try and locate the PC.
The question there is can I get the Last logged on user in the same query as the bios to have a single output line?
Something like -
("Select SerialNumber from Win32_Bios AND Username from Win32_ComputerSystem Where SerialNumber = 'Some list?'")
I know this is getting too complex for me as I am not familiar with WMI querying.
Basically I need 3 things - Machine name (one on our domain), last logged on user, and serial number off list I have OR a blank serial number (as the blank ones we have to go program).
Thanks for putting up with me guys your helping me learn alot about VBScripting and its uses. I now have a library of over 40 scripts developed and were running a good 10 of them almost weekly in production
Yeay you!