PowerCLI

 View Only
  • 1.  ViRole Descriptions

    Posted Aug 05, 2025 05:30 PM

    I can't seem to find a way to get/set the Description property of a vCenter role.

    $role = Get-VIRole -Name 'ReadOnly'
    PS C:\Users\Bennett.Blodinger> $role.Description
    ReadOnly
    PS C:\Users\Bennett.Blodinger> $role.ExtensionData.Info
    
    Label    Summary
    -----    -------
    ReadOnly ReadOnly
    As you can see, the Description property is just the name of the role again. Interestingly, it isn't even the friendly name.
    There is no Description property for New-VIRole, nor Set-VIRole.
    I tried to use the Code Capture feature in vCenter, but that didn't give anything useful.
    #----------------- Start of code capture -----------------
    
    #---------------RetrieveRolePermissions---------------
    $roleId = -1
    $_this = Get-View -Id 'AuthorizationManager-AuthorizationManager'
    $_this.RetrieveRolePermissions($roleId)
    
    #---------------Host---------------
    $_this = Get-View -Id 'ComputeResource-domain-s918995'
    $_this.Host
    
    
    #----------------- End of code capture -----------------
    Any ideas?


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


  • 2.  RE: ViRole Descriptions

    Posted Aug 12, 2025 11:15 AM

    I get the same results that you do. Honestly it seems like a bug. The bug appears to be with the vCenter. If you explore the MOB you will see the description mimics the name of the role.

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