I am new to Powershell script I am using vmstat command and i am trying to filter values based on total memory and used memory.
I have done this way but i am not able to just filter value.
PS /home/ec2-user> $usedmem = vmstat -s | Select-String 'used memory'
PS /home/ec2-user> $usedmem
217976 K used memory
But my question is,
how can i just get the value(217976) for used memory
I really appreciate your help