Trying to assign permissions for the Admin user on the folder root

I am trying to add a domain user on the permissions of the folder for the folder root in vCenter with administrative permissions.  I can get it to assign permissions for folders under the root, but not at the top of the tree.  See code below.

#Create a VIAccount object can be used with New-VIPermission, Get-VIPermission, PowerCLI etc.

Function New-VIAccount ($principal) {}

$flags = '

http://System.Reflection.BindingFlags: NonPublic - bor

http://System.Reflection.BindingFlags: Public - bor

http://System.Reflection.BindingFlags: DeclaredOnly - bor

http://System.Reflection.BindingFlags: Instance

$method = $defaultviserver. GetType(). GetMethods ($flags) |

where {$_.} Name - eq "VMware.VimAutomation.Types.VIObjectCore.get_Client"}

$client = $method. Invoke ($global: DefaultVIServer, $null)

Write-Output"

(New-Object VMware.VimAutomation.Client20.PermissionManagement.VCUserAccountImpl ')

(- ArgumentList $principal, "", $client)

}

$svcaccount = $domain + "\" + $username

$account = new-VIAccount "$svcaccount".

#(Get-dossier-dossier nom) | New-VIPermission-role Admin - main $account - spread: $TRUE # this adds the user to a folder called folder without any problem.

(Get-file-name of the centres of data-Id file-group-d1) | New-VIPermission-role Admin - main $account - spread: $TRUE # when I try to apply to the root folder I get the following error:

New-VIPermission: 2009-12-24 14:19:30 new-VIPermission 9C9AB6A7-E395-42D1-B944-516E1BBBCEF2 reference object not set to an instance of an object.

To... vCenterSettings.ps1:93 tank: 70 + (Get-file-name of centres of data-Id file-group-d1). New-VIPermission < < < < - role Admin-main $account - spread: $TRUE

I was able to reproduce the problem, which seems to be another bug for the cmdlet New-VIPermission in PowerCLI 4u1 indeed.

As a workaround, you can call the SetEntityPermissions method directly like that

$domain = 
$username = 
$svcaccount = $domain + "\" + $username

$folder = Get-Folder -Name "Datacenters"
$authMgr = Get-View AuthorizationManager
$perm = New-Object VMware.Vim.Permission
$perm.principal = $svcaccount
$perm.propagate = $true
$perm.roleid = ($authMgr.RoleList | where{$_.Name -eq "Admin"}).RoleId
$authMgr.SetEntityPermissions(($folder | Get-View).MoRef, $perm)

Tags: VMware

Similar Questions

  • Urgent: Assigning permissions to the folder P6Reports error

    Hello

    I installed the version 8.3 primavera6 in windows 2008.

    For the configuration of p6, BEEP

    measures available in the connecting_bi_publisher_to_P6 document.

    According to the document, while the assignment of permissions for the folder p6reports am getting error.

    "oracle.xdo.servlet.security.AdminUser cannot be cast to oracle.xdo.servlet.security.DirectoryUser.

    Please help me solve this problem.

    Hello

    The problem has been resolved.

    Solution:

    Log Publisher oracle bi with the administrator user

    1 > create a new user and assign the role of 'BI Publisher Administrator'.

    2 > connected as this new user and perform the same action of permission again

    Kind regards

    Kumar

  • Lightroom CC "User permissions error" - cannot change the permissions for the folder Preferences

    I noticed that Lightroom was running slow so I thought it was time to take stock. (I was using Lightroom 5.7). Yesterday, I downloaded the last LR update, which is Lightroom CC [1067055]. I thought that Lightroom CC would replace 5 Lightroom but apparently they have downloaded as separate applications. When I tried to launch Lightroom CC I got an error message indicating "Lightroom has met permission issues. I followed the directions from this link met Lightroom user permissions problems. Bridge of Photoshop Lightroom crashes or hangs at the launch but it does not set itself (I did not take the final step which is - create a new user account). I was working off of Yosemite, so I hope that the error can be corrected if I updated my operating system. Today, I downloaded El Capitan and Lightroom CC will not always open - I get the same error. I went to manually update the read and write permissions for the folders listed, but some of them don't make changes. The preferences file gives me an error saying "the operation cannot be performed because you don't have the necessary authorization." I don't have the "Adobe" folder in this route Caches

    • /Users/ [user name] / Library/Caches/Adobe /.

    How can I solve this problem and get Lightroom CC to work?

    Screen Shot 2016-03-20 at 5.31.21 PM.pngScreen Shot 2016-03-20 at 5.44.38 PM.pngScreen Shot 2016-03-20 at 5.34.50 PM.pngScreen Shot 2016-03-20 at 5.42.53 PM.png

    @laurawielos,

    Try this:

    the Macintosh HD > users > [your user folder... click on 'Go' on the options bar at the top on the desktop (Menu bar) > then click on the 'option' key > mouse down to the selection of 'Library' that should appear > click on it to open the folder /Users/ [your user name] /Library/ ' "]

    You should now find the appropriate folders to change permissions. Just give your user name of the read/write permissions. I don't think you want to give everyone the read/write permission as some authors have claimed.

  • How to restore the permissions for the folder

    I work with Windows 7 and Internet Explorer 10.

    Initially I tried see my Cookies folder and eventually he finds in C:\Users\(my user name).  I wanted to look at the files and potentially manually remove some, but I was not allowed access to the folder.  I am the sole owner and the user of that PC.  I figured it would give me full permission for files and folders.

    I tried to change the permissions on the folder, and even if the properties show that I have all permissions except "Special permissions" I was unable to open the folder.

    A second possibility, I changed the permissions 'All' allow all these same permissions - I clicked on full control.  A warning window appears saying that there are permissions that were more in agreement and it is potentially unstable.  I then decided to cancel this change all the permissions back, but am currently not able to restore the original permissions.  I am really unable to change all permissions to this folder now.

    I would like to restore the permissions on this folder Cookies in their original condition / by default.  Can someone help me?

    ALSO: since my original post, I noticed that in the icon beside my C:\username\ subdirectory when you view it in Solution Explorer, there is a lock.  I don't know if it was there before.  Is this a normal representation / by default to the directory?

    Thank you.

    Hi Susan,.

    Please follow the steps suggested by Amrita in http://answers.microsoft.com/en-us/windows/forum/windows_7-security/how-to-reset-all-user-permissions-to-default/9da312d2-c99b-4283-a275-e74d93dcc366

    Note: The steps mentioned in the link above involve changes to the registry. So it would be nice if you could take a backup of the registry before you start the troubleshooting step.

    http://Windows.Microsoft.com/en-in/Windows7/back-up-the-registry

    If the problem persists, try the steps suggested by Brent in http://answers.microsoft.com/en-us/windows/forum/windows_vista-security/restore-default-permission-settings-in-vista/7eacb966-cbbd-41ac-b08d-7c7f881943be

    Note: The steps in the above links works for Windows 7 and Windows Vista.

    For more information about the symbol of lock on certain issues, please go through the response of Steven S't-want-any-locks/f82a3e5e-5164-4dc2-9ec5-3e97ce7606d9 http://answers.microsoft.com/en-us/windows/forum/windows_7-files/folders-have-lock-symbol-don

    Hope this information helps. If you have any questions, please let us know.

  • I forgot my password for my admin user account, but I have a secondary account how to get the password for the admin

    original title: admin password.

    I forgot my password for my admin user account, but I have a secondary account how to get the password for the admin

    Hello
    Microsoft technical support engineers cannot help you recover the passwords of the files and Microsoft who are lost or forgotten product features. For more information about this policy, please refer to the sticky below.

    http://social.answers.Microsoft.com/forums/en-us/vistasecurity/thread/3eba3150-8742-4264-be9f-0daaad2282cd Lisa
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Permissions for the model folder

    Hello again :)

    I'll set up the permissions for the user of the ODI, but I can't do this for the model files. I give permission to the user to view some files and all permissions on another folder.
    I did it for the project and it works very well.

    Problem is that I can not drag and drop template designer to Security Manager folder. I tried with and without additional generic permissions on the folder template.

    The user have CONNECT and NG DESIGNER profiles.

    THNX in advance!

    Published by: user13278245 on July 2, 2010 01:11

    This is my absolute favorite. It seems that you are one of the few who have played with the security of the ODI and also have any questions: D.
    To resolve this issue, start the Security Manager. And then click the designer button in the Security Manager. Now, you will be able to drag-and - drop model files :)

    Whewww, that was hard. Wasn't it: D :D

  • Cannot open the document. Please check if you have read permissions for the file above.

    System:

    • Adobe Acrobat X Pro, 10.1.2
    • Windows 7 Enterprise, 32-bit
    • Badass de Core Quad CPU
    • 4 GB OF RAM
    • MS Word 2010 (Office 2010)

    I installed the latest version as an administrator and as an administrator. I have all the rights to all the files on the PC.

    When I try to create a PDF file from any Word document, if. DOC or. DOCX, I get an error window everytime:

    "Cannot open the document:

    "[document location]".

    'Please check if you have read permissions for the file above.'

    This occurs after the notice appears little "start of the application that created the document...". »

    If I open Word and create a PDF to the Ribbon, it works. It still only allows me to create from Acrobat.

    It creates a PDF file of Excel files, but not the DOC files. I looked for alternatives, but found nothing. I found that July 2011:

    "I have discovered Adobe support that it is a known problem with Office 2010 SP1 installed. It is news for someone of another encounter this problem, remove the SP1 and it will work ok. They said an update to fix this will be coming in the next quarter. »

    I have updated to the latest version 10.1.2 and I still have this problem.

    This is a major problem because it also fails on the batch conversions, which is what I really need for 100 or if the documents which must be PDFed. I'm not going to open each individual file and save each word.

    This is a KNOWN PROBLEM with Adobe, and if you look through the forums, you will find a lot of people having this problem, and so far, I have seen no solution.

    If anyone has found a solution, please report it here.

    Thank you!

    B

    Thus, the conversion does not work the first time if you remove the Normal.dotm? You have group policies that change your path models user (for Word) on a network drive?

  • How to prevent the appearance of "Failed to open Document" "Please check if you have read permissions for the file above.  This problem occurs when I try to convert a word in a PDF doc.

    How to prevent the appearance of "Failed to open Document" "Please check if you have read permissions for the file above? This problem occurs when I try to convert a word in a PDF doc.

    Hi [email protected] ,

    Please try to follow the steps mentioned in this thread with a similar problem: Impossible to open the document. Please check if you have read permissions for the above file.

    Also, let us know the acrobat version you have and the version of the OS on your system.

    Let us know if that helps.

    Concerning
    Sarojini

  • Just tried to download patches for the iOS version 2.3.2 Revel and got directed to the Apple site to re - pay $79. -? WTF? You try to download on Mac, iPhone and iPad? Fees once paid? Help?

    Just tried to download patches for the iOS version 2.3.2 Revel and got directed to the Apple site to re - pay $79. -? WTF? You try to download on Mac, iPhone and iPad? Fees once paid? Help? Also as a shooter, I love Nikon LM program, but Apple Mac, it blocks, the Adobe LM works better? If so what kind of discount can give a shooting game?IMG_2075.jpg

    Bill

    With regard to Revel:

    You can install free revel if you are a paid subscriber or not. I don't know why or how you got to pay apple site. Maybe you clicked on a link.

    On your ipad and iphone, you can go to the app store, search for revel and press "install". There is not a new version for mac, but you can go on the mac app store and install version 1.10.

    Guinot

  • Graphic of alias created for the folder is not transferred in the doc.  Everything in batteries.

    Graphic of alias created for the folder is not transferred in the doc.  Everything in batteries.  Done in PS and saved as a JPEG.  I did a lot.  not sure why it does not work now.  These are records that have elements in them and it only shows the stacks of items in the folder in the doc.

    ideas?

    control, click the icon in the Dock and have her take > folder

  • Permissions for the users of Thunderbird

    Dear staff of Thunderbird,

    I have a question to limit the permissions of the users in Thunderbird.
    I want to set permissions on the installation of Thunderbird extensions (add-on), users could not install no matter what extension (add-on).
    Is this possible, if so how to configure?

    Thank you in advance,
    Computer SCIENCE Department of CJSC
    Hayk Haroyan

    Think a little out of box... I guess people have their own computer / user account.

    Thunderbird would need to have been already installed, but I think you could change the privileges and prevents the user from any other software installation/download.

    Such as:

  • How can I change the permissions for the program, I get the error message windows cannot find the target and II do not have permission to open any programs

    I deleted a virus and now I can't access anything whatsoever, except by admin, and is very limited

    Hello

    Permissions and security issues with Vista/Win7?

    Check the following settings.

    All the users who are allowed to share need to have an account on all computers that they are allowed to connect to.

    Everyone is an account, that means a group of all users who already have an account now as users.

    Using the functionality of all saved the need to configure authorization for each of the established users, it does mean not all those who feel that they would like to connect.

    Users who do not have an account on the computer are not part of the Everyone group.

    If the LAN security is useless and users are not established, then move on the guest account provides the semi-open configuration.

    http://Windows.Microsoft.com/en-us/Windows7/turn-the-guest-account-on-or-off

    ---------------------

    Point to a folder that wants to share do right click and choose Properties.

    In the properties

    Click on the Security tab shown in the bellows of the photo on the right) and verify that users and their permissions (see photo below Centre and left) are configured correctly. Then do the same for the authorization tab.

    This screen shot is to Win 7, Vista menus are similar.

    http://www.ezlan.NET/Win7/permission-security.jpg

    The Security Panel and the authorization Panel, you need to highlight each user/group and consider that the authorization controls are verified correctly.

    When everything is OK, restart the network (router and computer).

    * Note . The groups and users listed in the screen-shoot are just an example. Your list will focus on how your system is configured.

  • File permissions for the UNIX file created by ODI

    Hello

    I use ODI to extract data from a table and put it in a file delimited on a UNIX machine.  Everything works with the file, the file goes to the right place, the correct layout and data looks good, but when ODI creates the file it gives the read permission for the owner and group, but not the user(-rw-r---).  I need the user to be able to read the file so that the GIS or other users can pick it up (- rw - r - r-). ODI sets file permissions and if so can I change them?

    I use ODI 11.1.1.7.0 and IKM SQL to add files.

    Thank you

    You can always add a step to your package for the question chmod command to change the creation of positions of file permissions so that it is readable by all users

  • Backup permissions for Active Directory users

    Hello

    is it possible (e.g. by vim - cmd), permission settings backup referring users to the AD?

    I have a domain controller which is a failure sometimes briefly and whenever that happens, forget my esxi / loses all permissions for users of the AD, while I again subsequently enter manually.

    Or does anyone have another tip for me, which could help prevent the loss of permission to users of the AD settings?

    Thanks in advance!

    I would investigate why your DC is falling, as it seems that causes the initial problems. as far as I know, once permissions have been applied, they should persists, but since your DC is down, I can't really say what is the expected result. You can take a look at newspapers to see if it takes DC are available to keep the roles, etc.

    In any case, if you need to quickly redeploy rules using vim - cmd, take a look at this blog post - http://www.virtuallyghetto.com/2011/02/automating-active-directory-user.html

    These permisisons must be stored under etc/vmware/hostd/authorization.xml, so you could technically simply this backup file and restore if necessary. You probably need to restart either process pass or the host so that the changes take effect

  • Can I set permissions for the public catalogue of training?

    We want to have all users to enter the training catalog and self register. We have more than 7,000 employees with no distribution list for all peoples. How to set the permissions for all employees to refer to the training catalog and self register?

    Ah, support strikes again. The training catalogue is not and can not be publicly visible. This permission setting is available for objects in the content library.

    If you go to the training tab, then training catalog, you will see an option to set the permissions to the training catalog. Choose that and you will be able to add any individual or group in the list on the left to the list on the right to give them permissions to display. There will be no option "make publicly visible.

    If an individual is not listed in the list on the right (or a member of a group on the list on the right), then they will receive the unauthorized message.

Maybe you are looking for