I am trying to execute an exe on a remote computer using invoke-command. Executing the exe on the remote machine after logging into the machine using remote desktop takes 1G
Complete PowerShell script, based on mjolinor's answer, for anyone who wants to skip the reasons and just make it work:
Set-Item WSMan:\localhost\Shell\MaxMemoryPerShellMB 1000000 Set-Item WSMan:\localhost\Plugin\Microsoft.PowerShell\Quotas\MaxMemoryPerShellMB 1000000 Restart-Service WinRM