When PowerCLI script takes more time to complete, you experience these symptoms:
This is an expected behavior. The default time out for PowerCLI script on vCenter Server is 5 minutes. vCenter Server terminates any PowerCLI script that takes more than 5 minutes to complete.
To work around this issue, increase the time out duration for PowerCLI script on vCenterServer by adding the advanced parameter config.vpxd.userCommandTimeoutSecs with the required value.
To add the advanced parameter:
Note: Restarting vCenter Server is not required to apply the new setting.