VMware Cloud Community
buckeye
Contributor
Contributor
Jump to solution

Required permissions?

I have some scripts that we put together to generate reports from Virtual Center. I am unable to run these scripts with a user that is granted the read only role within VC. The scripts run fine with my domain ID that has the administrator role. I want to schedule these scripts to run, but I do not want to have a user ID out there with admin rights to VC for this task.

What are the minimum level of permission required to run VI Powershell scripts against VC? These scripts are not trying to create vms, modify vms, or make any changes to the enviornment.

0 Kudos
1 Solution

Accepted Solutions
ykalchev
VMware Employee
VMware Employee
Jump to solution

Getting inventory items or any stats from VC require read-only perssions. However a problem has been reported about permissions ( ) and I think this is your case too.

To workaround it just add Sessions->ValidateSession permission to your user role and you should be able to run your scripts.

Regards,

Yasen

Yasen Kalchev, vSM Dev Team

View solution in original post

0 Kudos
3 Replies
LucD
Leadership
Leadership
Jump to solution

Unfortunately the VI Toolkit help file does not contain the required privileges for each cmdlet.

But you could use Appendix B Managed Object Privileges Reference in the SDK 2.5 Programming Guide to deduce what privileges are required on which object for which cmdlet by guessing the operation(s) that is/are behind the cmdlet.

One remark, for some operations the permission can be required on the object's parent or even on the root folder.

See Chapter 13 Managing Users in the SDK 2.5 Programming Guide.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
ykalchev
VMware Employee
VMware Employee
Jump to solution

Getting inventory items or any stats from VC require read-only perssions. However a problem has been reported about permissions ( ) and I think this is your case too.

To workaround it just add Sessions->ValidateSession permission to your user role and you should be able to run your scripts.

Regards,

Yasen

Yasen Kalchev, vSM Dev Team
0 Kudos
buckeye
Contributor
Contributor
Jump to solution

Thanks, ykalchev. Adding the Sessions->Validate Session permission to the role fixed my problem.

0 Kudos