PowerCLI Reference

Get-VIPrivilege

Synopsis

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

Syntax

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

Get-VIPrivilege [[-Name] <String[]>] [-Id <String[]>] [-PrivilegeGroup] [-PrivilegeItem] [-Server <VIServer[]>] [<CommonParameters>]

Get-VIPrivilege [[-Name] <String[]>] [-Role] <Role[]> [-Id <String[]>] [<CommonParameters>]

Related Commands

Online Version
Get-VIRole
New-VIRole
Remove-VIRole
Set-VIRole

Detailed Description

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

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
NameString[]Specifies the names of the privileges you want to retrieve.falseFalse
GroupPrivilegeGroup[]Specifies the privilege group whose items you want to retrieve.trueTrue (ByValue)
RoleRole[]Specifies the roles whose privileges you want to retrieve.trueTrue (ByValue)
IdString[]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.
falseFalse
PrivilegeGroupSwitchParameterIndicates that you want to retrieve only the privilege groups and not the privilege items in them.falseFalse
PrivilegeItemSwitchParameterIndicates that you want to retrieve only the privilege items and not the privilege groups.falseFalse
ServerVIServer[]Specifies the vCenter Server systems on which you want to run the cmdlet. If no 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.falseFalse

Return Type

Zero or more Privilege objects

Notes

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.


Copyright © VMware, Inc. All rights reserved.