It might be that you are trying to execute some large powershell processes and you get this System.OutOfMemoryException error. It happened to me when working with the new (still unreleased) version of This is Merging! for Dynamics NAV.
If you are suffering from the same issue, what Powershell is telling you is that the Powershell session is using more memory than allowed by the system.
In order to find out how much memory you have assigned you can do it by typing the following in a powershell command prompt (preferibly with admin rights):
In order to do so, type the following command:
set-item wsman:localhost\shell\maxmemorypershellmb 2048