Syntax
Get-VIRole [[-Name] <String[]>] [-Id <String[]>] [-Server <VIServer[]>] [<CommonParameters>]Related Commands
Online versionDetailed Description
This cmdlet retrieves all roles defined on the provided servers.Parameters
Name | Type | Description | Required? | Pipeline Input | Default Value |
---|---|---|---|---|---|
Name | String[] | Specifies the names of the roles you want to retrieve. | false | false | |
Id | String[] | Specifies the IDs of the roles 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. | false | false | |
Server | VIServer[] | 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. | false | false |
Return Type
Zero or more Role objectsNotes
Examples
-------------- Example 1 --------------
Get-VIRole -Server $server -Name "Admin*"
Retrieves all roles on the specified server with names that start with "Admin".