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.