When trying to execute a batch file which calls a PowerShell script from Toad Automation, the PowerShell scripts fails with an Out of Memory message. If the PowerShell script is executed manually (not called from Toad), the script will execute successfully every time. I am unsure how to fix this issue since the PowerShell and the batch file only fail when it is executed from an Automation script.
対策
By default, a remote shell will be allocated 250 MB of memory, this may cause some of the command to fail, for example site collection creation.
Call a batch file from Toad which executes Scheduled Task which will run the PowerShell script.