VMware Cloud Community
xXvenszXx
Enthusiast
Enthusiast

Export / Import folder permissions

Hello VMware Community,

I´m preparing some scripts for a datacenter move but I´m stucking on the permissions export / import on folders.

I searched and tried a lot but the most scripts have problems with the same folder name twice in a datacenter or are for a complete vCenter move.

I´m searching for a permission script:

- export folder permissions and virtual machine permissions (if possible)

- import the permissions on the same vCenter but on another datacenter

I tried those but there I get the following error (attached):

Exception calling "SetEntityPermissions" with "2" argument(s): "The object 'vim.Folder:group-v455464 group-v455465'

has already been deleted or has not been completely created"

I also tried this http://www.virtu-al.net/2009/06/15/vsphere-permissions-export-import-part-1/ but this one looks like has problems with folders of the same name in the same datacenter but on different structure level - only the first folder will get the permission:

- Datacenter1
     - Infrastructure

          - Server

               - Linux

     - Voice

          - Linux

Maybe, someone already have a solution for my problem Smiley Happy Looking forward to hear from you guys.

Have a nice weekend and stay healthy.

Greetings

VSS

0 Kudos
2 Replies
LucD
Leadership
Leadership

Instead of doing a straightforward Get-Folder, you need to export the full path to the folder.

See my Get The Folderpath post.

See also Re: Export/Import Folder Structure

You will need to add the permissions to the export.


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

0 Kudos
xXvenszXx
Enthusiast
Enthusiast

I´m not that good in PowerCLI but I will check it how I get your part into the script I found.

0 Kudos