VMware Cloud Community
dharmendrarhce
Enthusiast
Enthusiast
Jump to solution

Move Folder from VM & Template View to Host& Cluster View

Hi ,

I have imported the User roles & permissions from one vcenter to another Vcenter .

In New Vcenter all the users and moved in a specific "Datacenters" folder . The user which are in that folder unable to view anything in the vcenter after logging except the datacenter folder and that content. This Datacenters folder can be see in Vm & template View only.

All the user are set define In as " This object and It's children"

I can there is one more folder " Test" in Host & cluster View . All the user which are in that test folder can view everything in the vcenter

All the user are set define In Test folder  as  " Global Permission" or with Vcenter .

I need a help to allow  all the imported user to view the all the content in the vcenter . Might be if we move the folder to in host and cluster view , it could work

any help ?

0 Kudos
1 Solution

Accepted Solutions
LucD
Leadership
Leadership
Jump to solution

That's what I expected, you created a Folder with the name Datacenters (which is also the hidden name for the root folder) but with the type VM.

You can copy all permissions from that Datacenters (type VM) folder to the root folder (also named Datacenters, but with type Datacenter) with this.

$root = Get-Folder -Name Datacenters -Type Datacenter

$datacenters = Get-Folder -Name Datacenters -Type VM

Get-VIPermission -Entity $datacenters | %{

    New-VIPermission -Entity $root -Principal $_.Principal -Role $_.Role -Propagate:$_.Propagate

}

That should give your users the permissions throughout the complete vSphere environment.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

View solution in original post

0 Kudos
6 Replies
LucD
Leadership
Leadership
Jump to solution

Sorry, not 100% sure I get the question.

What do you mean with "all the users and moved in a specific "Datacenters" folder"?

Do you mean that you have given Permissions to all the users on that folder?

Are we talking about the hidden "Datacenters" folder, in other words the root of the vCenter?

Perhaps a screenshot or two would make things a bit clearer?


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
dharmendrarhce
Enthusiast
Enthusiast
Jump to solution

What do you mean with "all the users and moved in a specific "Datacenters" folder"?

   >>>>>After the Import the user roles from another vcenter , ALl the imported users are in Datacenters folder While can be found in " VM & Cluster View in VC "<<<

Do you mean that you have given Permissions to all the users on that folder? No .. All the the user details are in the folder only

Are we talking about the hidden "Datacenters" folder, in other words the root of the vCenter? I am not sure , might be but all the user which are in that folder can see the folder content only , nothing in vcenter

Perhaps a screenshot or two would make things a bit clearer? Please find the attachment --

One Datacenter folder permission

Another folder which is preexist on vcenter  

I used below link to export and import the user and roles.

using that script 1st i imported folders, roles and permissions.

Powershell - Export/Import Folders and Permissions to another vCenter - VMWare Insight

0 Kudos
LucD
Leadership
Leadership
Jump to solution

Your screenshots are missing the part I actually wanted to see, the location in the vSphere hierarchy where the permissions were assigned.

datacenters.png

In fact the hidden folder Datacenters is actually the location represented in the Navigator by the vCenter entry.

If you assign 'read' permissions through the ReadOnly role, with the propagate option, on this entry to all users, they will be able to 'see' the environment.

For example, the following will give ReadOnly permissions to user domain\user to all entries in your vSphere environment.

$root = Get-Folder -Name Datacenters

New-VIPermission -Entity $root -Principal domain\user -Role ReadOnly -Propagate:$true


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
dharmendrarhce
Enthusiast
Enthusiast
Jump to solution

Hi ,

Please find the Folder location

0 Kudos
LucD
Leadership
Leadership
Jump to solution

That's what I expected, you created a Folder with the name Datacenters (which is also the hidden name for the root folder) but with the type VM.

You can copy all permissions from that Datacenters (type VM) folder to the root folder (also named Datacenters, but with type Datacenter) with this.

$root = Get-Folder -Name Datacenters -Type Datacenter

$datacenters = Get-Folder -Name Datacenters -Type VM

Get-VIPermission -Entity $datacenters | %{

    New-VIPermission -Entity $root -Principal $_.Principal -Role $_.Role -Propagate:$_.Propagate

}

That should give your users the permissions throughout the complete vSphere environment.


Blog: lucd.info  Twitter: @LucD22  Co-author PowerCLI Reference

0 Kudos
dharmendrarhce
Enthusiast
Enthusiast
Jump to solution

Sorry for late response

.. Thanks for you solutions , it worked prefectyp fine

Thanks again

0 Kudos