This cmdlet retrieves content libraries and returns a set of content libraries that correspond to the filter criteria defined by the cmdlet parameters.
PS C:\> Get-ContentLibrary
https://developer.broadcom.com/powercli/latest/vmware.vimautomation.core/commands/get-contentlibrary
Invoking this method may result with an error if user permissions are not defined.
vCenter 7.x/8.x
PowerCLI SDK
A permission denied error occurs when user permissions are not defined in vCenter.
PS C:\Users\Username> get-contentlibrary
Get-ContentLibrary: Get-ContentLibrary An error occurred while trying to get content libraries by names: Permission to perform this operation was denied.
Apply Content Library permissions to the user.
Content Library Privileges
https://techdocs.broadcom.com/us/en/vmware-cis/vsphere/vsphere/8-0/vsphere-security-8-0.html
Content Libraries provide simple and effective management for virtual machine templates and vApps. Content library privileges control who can view or manage different aspects of content libraries.
To assign a permission on a content library, an Administrator must grant the permission to the user as a global permission. Global permissions support assigning privileges across solutions from a global root object.