After an upgrade to the latest version of the platform IDE, when republishing over 400 modules using the line below, I always run into a out of memory issue in PowerShell. I have 12GB of ram on my server. Is that not enough? Is there a limitation to how many modules the script can republish at once? Am I running the script incorrectly?
Get-OSPlatformModules -Credential $SCCreds -PassThru -Filter {$_.StatusMessages.Id -eq 13} -ErrorAction Stop | Publish-OSPlatformModule -Wait -Verbose -ErrorAction Stop | Out-Null