Quantcast
Channel: VMware Communities : All Content - All Communities
Viewing all articles
Browse latest Browse all 180329

New-VIPermission fails because AD has too many objects

$
0
0

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.


Viewing all articles
Browse latest Browse all 180329

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>