While running a command like this one
Invoke-Command -ComputerName remotemachine -Credential $cred -scriptBlock {& C:\Windows\Microsoft.Net\Framework64\v4.0.30319\ngen.exe install C:\Assemblies\my.dll /verbose}
we encounter this error “Out Of Memory while compiling method …”
If we run the command locally on the remotemachine it works fine.
Anyone have any suggestions?