JSI Tip 10412. How can I report all the computers in my domain that have a multiprocessor HAL?

I have scripted MPComputers.bat to generate a CSV list of all the computers in your domain that have a multiprocessor HAL (Hardware Abstraction Layer), showing the number of processors and processor architecture, like:

"JSI001","2","x86"
"JSI009","4","x86"
The CSV list is displayed on the console, put you can pipe it to a file using:

MPComputers>FileName.

NOTE: If NETDOM.EXE is not installed on the computer you will use to run MPComputers.bat, install it from the Support / Tools folder of your O/S CD-ROM.

NOTE: MPComputers.bat uses REG.EXE, built into Windows XP, Windows Server 2003, and later operating systems, or installed from the Windows 2000 Support Tools.

MPComputers.bat contains:


@echo off
setlocal ENABLEDELAYEDEXPANSION
set netdm=netdom query /domain:%userdnsdomain%
for /f "Skip=1 Tokens=*" %%c in ('%netdm% dc^|find /v /i "The command completed successfully."') do (
 set cmp=%%c
 call :doit
)
for /f "Skip=1 Tokens=*" %%c in ('%netdm% server^|find /v /i "The command completed successfully."') do (
 set cmp=%%c
 call :doit
)
for /f "Skip=1 Tokens=*" %%c in ('%netdm% workstation^|find /v /i "The command completed successfully."') do (
 set cmp=%%c
 call :doit
)
endlocal
goto :EOF
:doit
set work=%cmp:     ( Workstation or Server )=%
if "%work%" NEQ "%cmp%" set cmp=%work%#
set cmp=%cmp: #=%
set cmp=%cmp:#=%
set mp=N
for /f "Tokens=2*" %%r in ('reg query "\\%cmp%\HKLM\SOFTWARE\Microsoft\Windows NT\CurrentVersion" /v CurrentType^|find /i "Multiprocessor"') do set mp=Y
if "%mp%" EQU "N" goto :EOF
set np=
set pa=
for /f "Tokens=2*" %%r in ('reg query "\\%cmp%\HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /v NUMBER_OF_PROCESSORS^|find "REG_"') do set np=%%s
for /f "Tokens=2*" %%r in ('reg query "\\%cmp%\HKLM\System\CurrentControlSet\Control\Session Manager\Environment" /v PROCESSOR_ARCHITECTURE^|find "REG_"') do set pa=%%s
@echo "%cmp%","!np!","!pa!"



Hide comments

Comments

  • Allowed HTML tags: <em> <strong> <blockquote> <br> <p>

Plain text

  • No HTML tags allowed.
  • Web page addresses and e-mail addresses turn into links automatically.
  • Lines and paragraphs break automatically.
Publish