1
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 – 2019-06-07T15:18:38.173Thx 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 – 2019-06-11T12:24:14.950