[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 218
  • Last Modified:

Find the Bios version of all machines

Hi,

Is there a way to find the Bios version of all machines in a file.

Regards
Sharath
0
bsharath
Asked:
bsharath
1 Solution
 
canaliCommented:
:: ================
:: READ THIS FIRST
:: ================
:: * To run this script you must have domain administrators rights.
:: * This script require "Computers.txt" file on C: drive root from where it will pick computer names.
:: * Successful run will generate "biosinfo.htm" on C: drive root.
:: * Copy and Paste following script into notepad and save it with any name having .bat extension.
:: Batch Script Start

@Echo Off
SETLOCAL EnableDelayedExpansion

IF NOT EXIST C:\Computers.txt Goto ShowErr
FOR %%R IN (C:\Computers.txt) Do IF %%~zR EQU 0 Goto ShowErr
IF EXIST C:\biosinfo.htm DEL /F /Q C:\biosinfo.htm

FOR /F %%c IN ('Type Computers.txt') Do (
    Echo Processing: %%c
      PING -n 1 -w 1000 %%c|Find /I "TTL" >NUL
      IF NOT ErrorLevel 1 (
            SET Qry=wmic /NODE:"%%c" bios get Description,Manufacturer,Name,SMBIOSBIOSVersion,SMBIOSMajorVersion,SMBIOSMinorVersion,ReleaseDate  /format:hform
            !Qry! >>C:\biosinfo.htm
      )ELSE (Echo %%c: Not able to connect )
)      

Goto EndScript
:ShowErr
Echo "C:\Computers.txt" file does not exist or file is empty!
:EndScript
ENDLOCAL
:: Batch Script End
0

Featured Post

What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now