Finally the help of IT is here

Blog of computer solutions.

Detect RAM usage remotely using powershell

Written by Xaus Xavier Nadal on October 8th, 2012

Today I needed RAM usage detect multiple remote servers to a study of performance and provide a tailored solution to a customer who wants to virtualize your physical server environment.

To make the query I usedpowershelland the commandget-wmiobjectalong with the classwin32_operatingsystem,this does not need to remotely access servers that we want to detect the use of RAM.

The specific value of the use of RAM that I know I can not get straight and I had to do a subtraction between the valueTotalVisibleMemorySizeand valueFreePhysicalMemory. As you all know the use of ram is not stable so if you want to do a study properly, you will have to check this value at various times of the day and do half for example.

I pass the entire command and the result obtained.

get-wmiobject-class "win32_operatingsystem"-computername server1, server2, server3 | ft __ SERVER, @ {expression = {($ _.TotalVisibleMemorySize) - ($ _.FreePhysicalMemory)}, label = "UsedMemory"}

__SERVER UsedMemory

-------

server1 1816500

server2 648668

server3 1738564

I hope you will help.

PS: All this would not have been possible without the invaluable help of one of the best guys Scripting the moment .. Those who follow the blog already know, I do not need to put your name as you would most like to live in anonymity until further notice .. hehe ..

Greetings and see you soon and of course if any of you know how to improve the script, or has to detect the exact query RAM usage without making strange calculations in the script, please post it as a comment and so may see the whole community.

Always good people to comment and contribute knowledge and remember always constructive criticism .. At least for me.

Related Posts Plugin for WordPress, Blogger ...
Tags: , , , , , , , , , ,


Leave a Reply

XHTML: You can use in Original tags: <a href="" title=""> <abbr title = ""> <acronym title = ""> <b> <blockquote cite = ""> <cite> <code> <del datetime = ""> <em> <i> <q cite = ""> <s> <strike> <strong>

GTranslate Your license is inactive or expired, please subscribe again!