powershell - Output free Memory as single value in Mega Bytes -


i searching solution, want free memory space single value in mb.

when example out-file it, time stap etc.

for me doesn't matter wheter result get-counter or get-wmiobject.

i tried way , ofc full message outfiled...

get-wmiobject win32_operatingsystem freephysicalmemory  get-counter -counter "\memory\available mbytes" 

thank in advance!

ray

$mem = get-counter -counter "\memory\available mbytes" $mem.countersamples[0].cookedvalue 

or

# freephysicalmemory represented in kb, devide in 1kb value in mb (get-wmiobject win32_operatingsystem freephysicalmemory).freephysicalmemory/1kb 

Comments

Popular posts from this blog

php - Calling a template part from a post -

Firefox SVG shape not printing when it has stroke -

How to mention the localhost in android -