Link to home
Start Free TrialLog in
Avatar of Dustin Wade
Dustin WadeFlag for United States of America

asked on

Adding full "Virtual machine" privilege to a role over PowerCLI

I've set up some very simple scripts to set up some roles on hosts and add permissions to those roles. I've been able to get other privileges in there ("resource","datastore",etc), but for some reason I can't add the "Virtual machine" permission or group. If I run get-viprivilege -name "virtual machine" it gives me the result of Virtual machine meaning it's there, right? I've even tried using the get-viprivilege results as my target and no luck. Is there some other name I need to provide for it to know I'm looking for everything under the Virtual machine category?

$hosts=(get-vmhost|select Name)
$hosts|%{set-virole -server $_.Name -role <ROLENAME> -addprivilege "Virtual machine","resource","Datastore","vApp","Performance"}
ASKER CERTIFIED SOLUTION
Avatar of Dustin Saunders
Dustin Saunders
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial