Get-CIRole Command | Vmware PowerCLI Reference

Get-CIRole

This cmdlet retrieves roles in the cloud. You can filter the output by using the cmdlet parameters.

Syntax

Get-CIRole
[-Name < String[] > ]
[-Org < Org[] > ]
[-ProgressAction < ActionPreference > ]
[-Server < CIServer[] > ]
[-User < CIUser[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional Name String[] named
  • wildcards
Specifies the names of the cloud roles you want to retrieve.
optional Org Org[] named
  • pipeline
  • wildcards
Specifies cloud orgs to view their roles.
optional ProgressAction ActionPreference named
optional Server CIServer[] named
  • wildcards
Specifies the cloud servers on which you want to run the cmdlet. If no value is provided or $null value is passed to this parameter, the command runs on the default servers. For more information about default servers, see the description of Connect-CIServer.
optional User CIUser[] named
  • pipeline
  • wildcards
Specifies cloud users to view their roles.

Output

VMware.VimAutomation.Cloud.Types.V1.CIRole

Examples

Example 1

Get-CIRole

Retrieves all roles that are visible to the current user.

Example 2

Get-CIUser -Name User | Get-CIRole

Get the roles assigned to a cloud user.

Example 3

Get-CIRole -Name Role

Gets a role by name.

Example 4

Get-CIRole -Id roleId

Gets a role by Id.

Related Commands

CIRole

This cmdlet retrieves roles in the cloud.