vSphere PowerCLI Reference

Get-VIRole

Synopsis

Retrieves all roles defined on the provided servers.

Syntax

Get-VIRole [[-Name] <String[]>] [-Id <String[]>] [-Server <VIServer[]>] [<CommonParameters>]

Related Commands

Online version
New-VIRole
Remove-VIRole
Set-VIRole
Get-VIPrivilege
Get-VIPermission
New-VIPermission
Remove-VIPermission
Set-VIPermission

Detailed Description

Retrieves all roles defined on the provided servers.

Parameters

NameTypeDescriptionRequired?Pipeline InputDefault Value
NameString[]Specify the names of the roles you want to retrieve.falsefalse
IdString[]Specify the Ids of the roles you want to retrieve.falsefalse
ServerVIServer[]Specify the vSphere servers on which you want to run the cmdlet. If no value is given 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

Role

Notes

Examples

-------------- Example 1 --------------

Get-VIRole -Server $server -Name "Admin*"

Retrieves all roles on the specified server with names that start with "Admin".


Copyright © 1998 - 2012 VMware, Inc. All rights reserved.