VMware Cloud Community
elihuj
Enthusiast
Enthusiast
Jump to solution

PowerCLI Script to Create Role within vCenter

What I am looking for is a PowerCLI script to create a role within vCenter. I found this post, and I am wondering if it can be adapted to my needs. What I need specifically is a script to create a role with the following set of privileges:

System.Anonymous

System.View

System.Read

Global.SetCustomField

Datastore.AllocateSpace

Network.Assign

VirtualMachine.Inventory.Create

VirtualMachine.Interact.PowerOn

VirtualMachine.Interact.DeviceConnection

VirtualMachine.Interact.SetCDMedia

VirtualMachine.Interact.GuestControl

VirtualMachine.Config.AddNewDisk

VirtualMachine.Config.CPUCount

VirtualMachine.Config.Memory

VirtualMachine.Config.AddRemoveDevice

VirtualMachine.Config.Resource

VirtualMachine.Config.DiskExtend

Resource.AssignVMToPool

VApp.Import

StoragePod.Config


Can this be accomplished with a PowerCLI script?

0 Kudos
21 Replies
elihuj
Enthusiast
Enthusiast
Jump to solution

That actually works fine:

PowerCLI C:\ESXi Scripts> Get-Command -Name New-VIAccount

CommandType                    Name                            Definition

-----------                              ----                                  ----------

Function                             New-VIAccount               param($principal)...

0 Kudos
elihuj
Enthusiast
Enthusiast
Jump to solution

I guess I am just out of luck with the one huh? Smiley Happy

0 Kudos