VMware Cloud Community
shatztal
Contributor
Contributor

Is it able to lock a Customfield when created?

when i do set-custom is it able to lock it ?

so that when i see the attribute trough VI client i would not be able to edit the Value of it?

like the Build-in Attributes ? Name , Nic Count and etc.

Tags (3)
0 Kudos
4 Replies
LucD
Leadership
Leadership

Not afaik.

There is the "Set custom attribute" privilege but that is global for a specific role.

In other words, if a role has this privilege, the user/group who has this role assigned will be able to change custom attributes from a script or the vSphere Client.

You could, but this far fetched I admit, do the following:

- create a new role, called for example "Custom Attributes", that has the "Set custom attribute" privilege

- remove the "Set custom attribute" privilege from all other roles

- when you want to change a custom attribute through a script, create a permission on the object where you assign the "Custom Attribute" role to the user who runs the script

- when the change is done, remove the permission from the object

This is no fool-proof setup, but it will make sure that a user, who has no Administrator access, will be able to change the content of custom attribute through the vSphere Client.

In PowerCLI 4u1 you have all the cmdlets that are needed for this:

Get-Command *-VIPermission


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

shatztal
Contributor
Contributor

1. About the Permission it is a nice idea i tought about somthing like that but i don't want to mess with Permissions and all that .

2. about what you said that is in the PowerCli 4U1 . i didn't understand what you ment exactly if you can explain me again..

3. Another thing maybe you know. is it possible to make a CustomField that is a DROP DOWN LIST ?

so user can chose from the drop down list? so i can make a GLOBAL Att and every VM or Host supose i add the user can change the description and al that by a DROP choice .

thanks again

0 Kudos
LucD
Leadership
Leadership

1) Neither would I but it's the only solution I could see

2) I meant that all *-VIPermission cmdlet were introduced in PowerCLU 4u1. In previous builds those cmdlets were not there and you had to use the Community Extensions to work with roles, permissions and privileges.

3) Not that I know off. But have a look at the vSphere Client Plug-ins. That looks as if it would allow you to set up something like that.


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

0 Kudos
shatztal
Contributor
Contributor

thanks you very much i will try the plugins

0 Kudos