PowerCLI

 View Only
  • 1.  Get the role id of a role in Virtual center?

    Posted Oct 19, 2009 04:54 PM

    Can't seem to figure out simply how to get the role id of a role in Virtual Center. To later apply to a datacenter and a datastore with a domain group.

    So first problem is getting the role id. There isn't a cmdlet like Get-Cluster or Get-Resource pool. So how do I get that?

    Then I want to do something like:

    $dc = Get-Datacenter -Name $datacenter | Get-View to get a datacenter and apply that role to that datacenter using a domain group.

    Lastly I would like to do the same thing to a datastore (different role but same operation gathering role id).

    This fits in a larger scope script where I am creating a standard scheme of organization across the clusters in a VMFarm. I have all the resource pool, CPU Shares, Mem Shares, etc. working just this last piece on permissions.

    Please help!

    Thanks.



  • 2.  RE: Get the role id of a role in Virtual center?

    Posted Oct 19, 2009 05:44 PM

    Have a look at the scripts I provided in .

    I think most of what you are looking for is in those scripts.

    If it isn't clear from these scripts, don't hesitate to ask :smileywink: