?
Solved

New hardware changes

Posted on 2007-07-24
18
Medium Priority
?
315 Views
Last Modified: 2010-03-05
Hi,

We have just upgraded 300 machines with 512 ram.Previous it was 512.Now it is 1 GB.

Is there a way to check which all machines have been upgraded.

regards
Sharath
0
Comment
Question by:bsharath
  • 8
  • 7
  • 2
  • +1
18 Comments
 
LVL 1

Expert Comment

by:cmait
ID: 19554494
Hi!

Here we use Windows System Center to monitor all our computers. With Windows System Center you can collect all hardware and software and you can deploy software with it. Read more about it here:
http://www.microsoft.com/systemcenter/

Another free solution you can try out is spiceworks. Read more and download here:
http://www.spiceworks.com/
0
 
LVL 14

Expert Comment

by:canali
ID: 19555465
Hi Sharath,
this is the script.
Bye Gas

@echo off
:: Get ram info  in "alive" computers  found in the list c:\computers.txt
:: and check for updated
::
setlocal ENABLEDELAYEDEXPANSION
::  set the RAM quantity
::  if Computer ram is > ramsize the pc is already updated

::  ramsize is 512MB
set ramsize=536330240
for /f %%c in ('type c:\computers.txt') do (
  set t=
  (ping -n 1 -w 999 %%c|find /i "TTL" >nul)&&  call:_GETram %%c Ram: 2 && echo %%c: !t! ||echo %%c:  switched off
)
goto :_END

:_GETram
set c=
set d=%2
for /f "skip=1 delims= " %%a in ('WMIC.EXE /Node:%1  ComputerSystem  get TotalPhysicalMemory') do (
if %%a gtr %ramsize% (set d=!d! %%a more than 512MB updated
) else ( set d=!d! %%a less or equal 512MB NOT updated)
)
set t=!t! %d% %c%
goto :_EOF
:_END
:_EOF
0
 
LVL 11

Author Comment

by:bsharath
ID: 19555512
I get this.

C:\>"Getting ram.bat"
indiasophos:  switched off
Invalid Global Switch.
dev-chen-mrd100:  switched off
Invalid Global Switch.
dev-chen-nas01:  switched off
0
Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

 
LVL 14

Expert Comment

by:canali
ID: 19555867
probably there is something different in your wmi
try this:
@echo off
:: Get ram info  in "alive" computers  found in the list c:\computers.txt
:: and check for updated
::
setlocal ENABLEDELAYEDEXPANSION
::  set the RAM quantity
::  if Computer ram is > ramsize the pc is already updated

::  ramsize is 512MB
set ramsize=536330240
for /f %%c in ('type computers.txt') do (
  set t=
  (ping -n 1 -w 999 %%c|find /i "TTL" >nul)&&  call:_GETram %%c Ram: 2 && echo %%c: !t! ||echo %%c:  switched off
)
goto :_END

:_GETram
set c=
set d=%2
for /f "skip=1 delims= " %%a in ('WMIC.EXE /Node:%1  path win32_ComputerSystem  get TotalPhysicalMemory') do (
if %%a gtr %ramsize% (set d=!d! %%a more than 512MB updated
) else ( set d=!d! %%a less or equal 512MB NOT updated)
)
set t=!t! %d% %c%
goto :_EOF
:_END
:_EOF
0
 
LVL 11

Author Comment

by:bsharath
ID: 19556759
Still the same message
0
 
LVL 14

Expert Comment

by:canali
ID: 19560074
give me the output of this command
'WMIC.EXE /?|find /i "Computer"
0
 
LVL 14

Expert Comment

by:canali
ID: 19560127
give me the output of this command
WMIC.EXE /?|find /i "Computer"
I think there is some proplem with wmic
your computer are xp pro?
language version?
0
 
LVL 11

Author Comment

by:bsharath
ID: 19562319
I get this.


C:\>WMIC.EXE /?|find /i "Computer"
COMPUTERSYSTEM           - Computer system management.
CSPRODUCT                - Computer system product information from SMBIOS.
MEMPHYSICAL              - Computer system's physical memory management.
REGISTRY                 - Computer system registry management.
STARTUP                  - Management of commands that run automatically when us
ers log onto the computer system.

C:\>

I have Win 2003 and Win xp machines
All are English Versions
0
 
LVL 26

Expert Comment

by:Farhan Kazi
ID: 19562908
Add double quotes with machine name:
Like:
WMIC.EXE /Node:"%1" path win32_ComputerSystem  get TotalPhysicalMemory

@echo off
:: Get ram info  in "alive" computers  found in the list c:\computers.txt
:: and check for updated
::
setlocal ENABLEDELAYEDEXPANSION
::  set the RAM quantity
::  if Computer ram is > ramsize the pc is already updated

::  ramsize is 512MB
set ramsize=536330240
for /f %%c in ('type computers.txt') do (
  set t=
  (ping -n 1 -w 999 %%c|find /i "TTL" >nul)&&  call:_GETram %%c Ram: 2 && echo %%c: !t! ||echo %%c:  switched off
)
goto :_END

:_GETram
set c=
set d=%2
for /f "skip=1 delims= " %%a in ('WMIC.EXE /Node:"%1" path win32_ComputerSystem  get TotalPhysicalMemory') do (
if %%a gtr %ramsize% (set d=!d! %%a more than 512MB updated
) else ( set d=!d! %%a less or equal 512MB NOT updated)
)
set t=!t! %d% %c%
goto :_EOF
:_END
:_EOF
0
 
LVL 11

Author Comment

by:bsharath
ID: 19562959
I get this.


C:\>"Getting ram.bat"
dev-chen-mrd100:  switched off
dev-chen-pc1014:  switched off
dev-chen-srv400:  switched off
C:\>

Farhankazi

I did not understand this.

Add double quotes with machine name:
Like:
WMIC.EXE /Node:"%1" path win32_ComputerSystem  get TotalPhysicalMemory

Should i put this in the computers.txt file
0
 
LVL 14

Expert Comment

by:canali
ID: 19563519
@echo off
:: GetRam.cmd
:: Get ram info  in "alive" computers  found in the list c:\computers.txt
:: and check for updated with double quotes in PC name
:: try this script
::
setlocal ENABLEDELAYEDEXPANSION
::  set the RAM quantity
::  if Computer ram is > ramsize the pc is already updated

::  ramsize is 512MB
set ramsize=536330240
for /f %%c in ('type computers.txt') do (
  set t=
  (ping -n 1 -w 999 %%c|find /i "TTL" >nul)&&  call:_GETram %%c Ram: 2 && echo %%c: !t! ||echo %%c:  switched off
)
goto :_END

:_GETram
set c=
set d=%2
for /f "skip=1 delims= " %%a in ('WMIC.EXE /Node:"%1" path win32_ComputerSystem  get TotalPhysicalMemory') do (
if %%a gtr %ramsize% (set d=!d! %%a more than 512MB updated
) else ( set d=!d! %%a less or equal 512MB NOT updated)
)
set t=!t! %d% %c%
goto :_EOF
:_END
:_EOF
0
 
LVL 26

Expert Comment

by:Farhan Kazi
ID: 19563535
You dont need to change anything in script I already did (i have just provided the solution of "Invalid Global Switch" error).
I think still there is some minor problem in script, wait for Canali's comment.
0
 
LVL 11

Author Comment

by:bsharath
ID: 19563541
I get this.


C:\>"Getting ram.cmd"
dev-chen-pc1000:  Ram: 1064288256 more than 512MB updated  less or equal 512MB NOT updated
dev-chen-mrd100:  Ram: 1600126976 more than 512MB updated  less or equal 512MB NOT updated
dev-chen-nas01:  Ram: 1610088448 more than 512MB updated  less or equal 512MB NOT updated
dev-chen-pc5000:  Ram: 1063325696 more than 512MB updated  less or equal 512MB NOT updated
dev-chen-pc5001:  Ram: 1063256064 more than 512MB updated  less or equal 512MB NOT updated
C:\>
0
 
LVL 14

Accepted Solution

by:
canali earned 2000 total points
ID: 19564579
finally...

@echo off
:: GetRam.cmd
:: Get ram info  in "alive" computers  found in the list c:\computers.txt
:: and check for updated with double quotes in PC name
:: noDELAYEDEXPANSION
::
::
setlocal
::  set the RAM quantity
::  if Computer ram is > ramsize the pc is already updated

::  ramsize is 512MB
set ramsize=536330240
for /f %%c in ('type c:\computers.txt') do (
  set t=
  (ping -n 2 -w 500 %%c|find /i "TTL" >nul)&&  call:_GETram %%c 2>nul  ||echo %%c:  switched off
)
goto :_END
:_GETram
for /f "skip=1 delims= " %%a in ('WMIC.EXE /Node:"%1" path win32_ComputerSystem  get TotalPhysicalMemory') do (
if %%a gtr %ramsize% (
  echo %1: %%a more than 512MB updated
 ) else (
  echo %1: %%a less or equal 512MB NOT updated)
)
goto :_EOF
:_END
:_EOF

0
 
LVL 11

Author Comment

by:bsharath
ID: 19565304
I got this for a machine.

C:\>"Getting ram.cmd"
dev-chen-mrd100: 1600126976 more than 512MB updated
 less or equal 512MB NOT updated
C:\>

What does this mean...
0
 
LVL 14

Expert Comment

by:canali
ID: 19569230
What does this mean...
It's a nightmare... there is something different in your computer...
I'm curious the output of this command?
WMIC.EXE /Node:"dev-chen-mrd100" path win32_ComputerSystem  get TotalPhysicalMemory
0
 
LVL 11

Author Comment

by:bsharath
ID: 19571515
I get this.

C:\>WMIC.EXE /Node:"dev-chen-mrd100" path win32_ComputerSystem  get TotalPhysica
lMemory
TotalPhysicalMemory
1600126976

What i mean to ask you is.Is this correct.The Ram sizes which the script shows are correct.
If you run it on your machine what is the output?
0
 
LVL 14

Expert Comment

by:canali
ID: 19572633
All the scripts are working well on different os (xp,win2k3,win2k3R2), I cant realize what happen in your PC, the incriminated lines are these:
if %%a gtr %ramsize% (
  echo %1: %%a more than 512MB updated
 ) else (
  echo %1: %%a less or equal 512MB NOT updated)
)
it's a simple if statement, probably wmic query return some blank characters more an the if is executed 2 times :first with the right ram value an second with a space then else statement is executed  and the line :
 less or equal 512MB NOT updated
is displayed. But I can't reprodruce the error...
0

Featured Post

Upgrade your Question Security!

Add Premium security features to your question to ensure its privacy or anonymity. Learn more about your ability to control Question Security today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

INTRODUCTION The purpose of this document is to demonstrate the Installation and configuration of the Data Protection Manager product. Note that this demonstration was prepared on the basis of Windows OS is 2008 R2 and DPM 2010. DATA PROTECTI…
When you upgrade from Windows 8 to 8.1 or to Windows 10 or if you are like me you are on the Insider Program you may find yourself with many 450MB recovery partitions.  With a traditional disk that may not be a problem but with relatively smaller SS…
This video Micro Tutorial explains how to clone a hard drive using a commercial software product for Windows systems called Casper from Future Systems Solutions (FSS). Cloning makes an exact, complete copy of one hard disk drive (HDD) onto another d…
In this video, we discuss why the need for additional vertical screen space has become more important in recent years, namely, due to the transition in the marketplace of 4x3 computer screens to 16x9 and 16x10 screens (so-called widescreen format). …
Suggested Courses

864 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question