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
Post a Comment