Collections of vCenter data fail with error: The term <PowerShell script> is not recognized (2008500)
- vCenter Host Profiles, Host Status, and Inventory collections from Windows Server 2008 vCenter Servers fail
- You see this error in the Job History:
The term 'C:\Windows\CMAGEN~1.PEM\AGENTD~1\<Server Name>\RESPON~1\<Job ID>\WCI-VC~1\ci.input.ps1' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was included, verify that the path is correct and try again.
This error occurs because the PowerShell script does not have the correct permissions. The PowerShell script needs to be able to execute, to create a folder structure, and to copy the required scripts/files.
The permissions issue occurs because the Collector Service account is not a local administrator, and the Collector Service and Network Authority accounts do not have the
Log on as a batch job / Log on as a service permission in the Local Security Policy on the vCenter servers. This keeps the agent from being pushed correctly during a manual installation, which causes collections to fail.
To resolve this issue, correct the permissions for the Collector Service account and the Network Authority account on the Windows 2008 vCenter servers and then reinstall the agent on the vCM collector.
To correct the permissions and reinstall the agent:
- On the vCenter servers, go to Start > Administrative Tools > Local Security Policy.
- Navigate to Local Policies > User Rights Assignment.
- Add the Collector Service & Network Authority accounts to the
Log on as a batch joband
Log on as a servicepolicies.
- Reboot the server to allow the policy changes to take effect.
- On the vCM collector, go to Administration >Machines Manager > Licensed Machines > Licensed Windows Machines.
Right-click the entry for the Windows 2008 server, then select Install to reinstall the agent.
Note: In the Install Options dialog, be sure to select Reinstall Agent (remove current version) at the bottom.
After successfully re-installing the agent and running a successful Machines data type test collection, you can run vCenter data collections.