Hello,
with PowerCLI 12.1 we get an error when we revert to a snapshot with Set-VM -Snapshot if the user has only permission to a vm or a folder with vms.
Connect-VIServer vcenter -User userA
$vm = Get-Vm "vm01"
$snapshot = Get-Snapshot -VM $vm -Name "tmp"
Set-Vm -VM $vm -Snapshot $snapshot -Confirm:$false
Set-Vm : 20.10.2020 08:08:08 Set-VM Failed to get Lookup Service information for this vCenter server. Details:
Permission to perform this operation was denied. Required privilege 'System.Read' on managed object with id
'OptionManager-VpxSettings'.'
At line:1 char:1
+ Set-Vm -VM $vm -Snapshot $snapshot -Confirm:$false
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : InvalidOperation: (:) [Set-VM], VimException
+ FullyQualifiedErrorId : ViCore_ConnectivityServiceImpl_GetLookupServiceClient_NoClient,VMware.VimAutomation.ViCo
re.Cmdlets.Commands.SetVM
I have try it with PowerCLI 12.0 and didn't get this error.
I have olso try it with PowerCLI 12.1 and an other user who has permissions on the level of vcenter and get no error.
Can please watch a PowerCLI developer in the code and try to fix this?
Regards Maik
I suggest you open an SR
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference
We didn't have an SDK support contract, so the case will be closed with this hint. 😞
And I didn't know an other place to descripe it.
You don't need a Developer Support contract for opening an SR for this kind of issue.
If GSS claims you do, refer them to PowerCLI Support Breakdown
The more mentions of a problem the PowerCLI Team gets through SRs, the higher the priority of the issue will become.
Blog: lucd.info Twitter: @LucD22 Co-author PowerCLI Reference