I am trying to use vSphere PowerCLI to create new permissions in my vCenter.
I am running the following command
New-VIPermission -Entity (Get-Folder folder1) -Role (Get-VIRole PowerMan) -Principal "Domain\GroupName"
I get the Following result
New-VIPermission : 4/29/2013 4:45:28 PM New-VIPermission Could not fi
nd VIAccount with name 'Domain\GroupName'.
At line:1 char:17
+ New-VIPermission <<<< -Entity (Get-Folder Cognosservers) -Role (Get-VIRole F
inancePowerMan) -Principal "Domain\GroupName"
+ CategoryInfo : ObjectNotFound: (Domain\GroupName:Strin
g) [New-VIPermission], VimException
+ FullyQualifiedErrorId : Core_ObnSelector_SelectObjectByNameCore_ObjectNo
tFound,VMware.VimAutomation.ViCore.Cmdlets.Commands.PermissionManagement.N
ewVIPermission
New-VIPermission : 4/29/2013 4:45:28 PM New-VIPermission Value cannot
be found for the mandatory parameter Principal
At line:1 char:17
+ New-VIPermission <<<< -Entity (Get-Folder Cognosservers) -Role (Get-VIRole F
inancePowerMan) -Principal "Domain\GroupName"
+ CategoryInfo : NotSpecified: (:) [New-VIPermission], VimExcepti
on
+ FullyQualifiedErrorId : Core_BaseCmdlet_UnknownError,VMware.VimAutomatio
n.ViCore.Cmdlets.Commands.PermissionManagement.NewVIPermission
I think it is because MY AD has more than 5000 Objects which is what the ADS.maxFetch setting in My vCenter is set to. I can't even use get-viaccount -domain -group -name "Name" to return the AD Object i want to add.
Is there anyway to do this without changing the value of ADS.maxFetch. My ad has 30,000 users and groups.