Jump to content

Serial # from BIOS?


TSO
 Share

Recommended Posts

I don't know what you mean by "not logged on domain".

$wmi = ObjGet("winmgmts:")
$wql = "select * from win32_computersystem"
$results = $wmi.execquery($wql)
for $compsys in $results
  ConsoleWrite($compsys.domain)
next
I just meant to state that I wasn't referring to the logon domain (I wasn't referring to the domain for user accounts, but instead the machine accounts). Either way, you just gave me exactly what I needed. :)
Link to comment
Share on other sites

I created this to read the BIOS serial number Lenovo "IBM"

Dim $StrSerial

$StrSerial = ""

$ObjWMI = ObjGet("winmgmts:")

$ColSettingsBios = $ObjWMI.ExecQuery("Select * from Win32_BIOS")

For $ObjComputer in $ColSettingsBios

$StrSerial = $StrSerial & $ObjComputer.SerialNumber

Next

MsgBox(4096,"","Serial Number= " & $StrSerial)

$Result = StringLen($StrSerial)

IF $Result > 15 Then

$StrSerial = StringLeft ( $StrSerial, 15 )

EndIf

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...