In this study we have demonstrated the importance of physical boundaries in determination of the mechanical properties. With the inclusion of walls and by imparting the shear strains with the walls, we have found that the mechanical properties of polymers have a high spatial dependence in finite size geometries. The parts of the structures near the walls are stiffer whereas the parts in the vicinity of the free surfaces are weaker.