First off: Using an Administrator account works, but it is not desired.

We have a VM which needs to be reset once a week. We added a ScheduledTask to the VCenter Instance which runs these three lines:

VMWare.VimAutomation.Core\Connect-VIServer - Server $server -User $user -Password $password
VMWare.VimAutomation.Core\Set-VM -VM $vm -Snapshot $snap -Confirm:$false
VMWare.VimAutomation.Core\Disconnect-VIServer -Confirm:$false

We get the following error message:

Connect-VIServer : 6/7/19 9:47:35 AM    Connect-VIServer 
    Permission to perform this operation was denied.
    Required privilege 'System.Read' on managed object with id 'OptionManager-VpxSettings'.

So I guess that we need to add more privileges to the role associated with $user?

That User currently is in the "Main User of VM" group (or whatever it is called in the english UI, our version is german).

So how do we add System.Read to OptionManager-VpxSettings?

  • You can give the necessary permissions to any user you want. The error message indicates which permission is required. You will have to find the correct documentation for the version your using – Ramhound Jun 7 at 15:18
  • Thx for your reply and sry for the late response. The thing is: I can't find any reference which points me to Optionmanager-VpxSettings. The docs you linked are for vSphere 4/4.1. We use vSphere 6.5.0. – Malte Jun 11 at 12:24

I think you might be hitting some known issue. Any chance you are using PowerCLI 11.2? https://communities.vmware.com/thread/606971 I am not familiar with otionmanager, but i bet this stands on the ROOT object(the optionmanager). You will not see those managers in your vsphere client / webclient though. So one way of doing this is to add this permission to the ROOT/(Virtual center node) and select do not propagate. Then on the particular vm add the same permission. IF you don't want to use that, you might want to downgrade your powerCLI to a different version and check if it works.

  • That was it. Now the problem is gone. – Malte Sep 11 at 7:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.