Reply to Message

View discussion in a popup

Replying to:
elihuj
Enthusiast
Enthusiast

Import vCenter Permissions via XML

I am looking at Alan and LucD​'s import script for permissions in vCenter. I've used it in the past with no issues. I have been attempting to import permissions into my 6.7 vCenter, and have been receiving the following error:

Get-View : Cannot validate argument on parameter 'ViewType'. Accepted types: ClusterComputeResource, ComputeResource, Datacenter, Datastore,

DistributedVirtualPortgroup, DistributedVirtualSwitch, Folder, HostSystem, Network, OpaqueNetwork, ResourcePool, StoragePod, VirtualApp, VirtualMachine,

VmwareDistributedVirtualSwitch

At C:\vCenter_Permissions.ps1:231 char:34

+     $entity = Get-View -ViewType $_.EntityType -Filter @{"Name"=("^"  ...

+                                  ~~~~~~~~~~~~~

    + CategoryInfo          : InvalidData: (:) [Get-View], ParameterBindingValidationException

    + FullyQualifiedErrorId : ParameterArgumentValidationError,VMware.VimAutomation.ViCore.Cmdlets.Commands.DotNetInterop.GetVIView

Which corresponds to this line: $entity = Get-View -ViewType $_.EntityType -Filter @{"Name"=("^" + $EntityName + "$")}

Reply
0 Kudos