Using PowerCLI v5.1, and connected to a standalone ESXi 5.1 server, I can't give local accounts a role with the New-VIPermission commandlet. -
PS Z:\> new-vipermission -Role admin -Principal testid2 -Entity vmserver02
New-VIPermission : 12/21/2012 4:38:37 PM New-VIPermission Local group accounts are not supported since ESX version 5.1
At line:1 char:17
+ new-vipermission <<<< -Role admin -Principal testid2 -Entity vmserver02
+ CategoryInfo : InvalidOperation: (:) [New-VIPermission], VimException
+ FullyQualifiedErrorId : Client20_SystemManagementServiceImpl_TryValidate
EsxVersionSupportsGroups_Failed,VMware.VimAutomation.ViCore.Cmdlets.Commands.PermissionManagement.NewVIPermission
New-VIPermission : 12/21/2012 4:38:37 PM New-VIPermission Could not find VIAccount with name 'testid2'.
At line:1 char:17
+ new-vipermission <<<< -Role admin -Principal testid2 -Entity vmserver02
+ CategoryInfo : ObjectNotFound: (testid2:String) [New-VIPermission], VimException
+ FullyQualifiedErrorId : Core_ObnSelector_SelectObjectByNameCore_ObjectNotFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.PermissionManagement.NewVIPermission
New-VIPermission : 12/21/2012 4:38:37 PM New-VIPermission Value cannot be found for the mandatory parameter Principal
At line:1 char:17
+ new-vipermission <<<< -Role admin -Principal testid2 -Entity vmserver02
+ CategoryInfo : NotSpecified: (:) [New-VIPermission], VimException
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomation.ViCore.Cmdlets.Commands.PermissionManagement.NewVIPermission
The error says Local Group Accounts are not supported. However, I am not trying to create or use a local group. They don't exist for ESXi 5.1 This command had nothing to do with local groups, anyway.
This same command works with PowerCLI v5.0, on an ESXi5.1 server. Also, I have noticed I can give AD domain accounts a role with PowerCLI 5.1 and ESXi 5.1, just not local accounts. Is this a bug?