Dustin Wade
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",et c), 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","Datas tore","vAp p","Perfor mance"}
$hosts=(get-vmhost|select Name)
$hosts|%{set-virole -server $_.Name -role <ROLENAME> -addprivilege "Virtual machine","resource","Datas
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.