Please refer this script to get details about the availability of RAM slots.
This script will provide you the following details about RAM.
1.The Number of RAM slots available
2.The capacity of each RAM per slot
3.The number of used slots(s)
4.The details of the used slots
5.The installed RAM memory details