Add Set-ValentiaWSManMaxMemory
refactor code