Get-VIPrivilege Command | Vmware PowerCLI Reference

Get-VIPrivilege

This cmdlet retrieves the privilege groups and items for the provided servers.

Syntax

Get-VIPrivilege
[ -Group ] < PrivilegeGroup[] >
[-Id < String[] > ]
[-Name < String[] > ]
[-ProgressAction < ActionPreference > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Group PrivilegeGroup[] 1
  • pipeline
  • wildcards
Specifies the privilege group whose items you want to retrieve.
optional Id String[] named
  • wildcards
Specifies the IDs of the privileges you want to retrieve. Note: When a list of values is specified for the Id parameter, the returned objects would have an ID that matches exactly one of the string values in that list.
optional Name String[] named
  • wildcards
Specifies the names of the privileges you want to retrieve.
optional ProgressAction ActionPreference named
Get-VIPrivilege
[ -Role ] < Role[] >
[-Id < String[] > ]
[-Name < String[] > ]
[-ProgressAction < ActionPreference > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
required
Role Role[] 1
  • pipeline
  • wildcards
Specifies the roles whose privileges you want to retrieve.
optional Id String[] named
  • wildcards
Specifies the IDs of the privileges you want to retrieve. Note: When a list of values is specified for the Id parameter, the returned objects would have an ID that matches exactly one of the string values in that list.
optional Name String[] named
  • wildcards
Specifies the names of the privileges you want to retrieve.
optional ProgressAction ActionPreference named
Get-VIPrivilege
[-Id < String[] > ]
[-Name < String[] > ]
[-PrivilegeGroup ]
[-PrivilegeItem ]
[-ProgressAction < ActionPreference > ]
[-Server < VIServer[] > ]
[CommonParameters]

Parameters

Required Parameter Name Type Position Features Description
optional Id String[] named
  • wildcards
Specifies the IDs of the privileges you want to retrieve. Note: When a list of values is specified for the Id parameter, the returned objects would have an ID that matches exactly one of the string values in that list.
optional Name String[] named
  • wildcards
Specifies the names of the privileges you want to retrieve.
optional PrivilegeGroup SwitchParameter named
Indicates that you want to retrieve only the privilege groups and not the privilege items in them.
optional PrivilegeItem SwitchParameter named
Indicates that you want to retrieve only the privilege items and not the privilege groups.
optional ProgressAction ActionPreference named
optional Server VIServer[] named
  • wildcards
Specifies the vCenter Server systems 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-VIServer.

Output

VMware.VimAutomation.ViCore.Types.V1.PermissionManagement.Privilege

Examples

Example 1

Get-VIPrivilege -Name "Host*"

Retrieves all privileges with names that start with "Host".

Example 2

Get-VIPrivilege -PrivilegeGroup

Retrieves all privilege groups.

Related Commands

VIPrivilege

This cmdlet retrieves the privilege groups and items for the provided servers.

VIPrivilegeReport

This cmdlet records the privilege checks that occur for the specified sessions during the execution of a specified script block.