Data ONTAP® PowerShell Toolkit

Switch to Data ONTAP 7-mode documentation.

Cmdlet: Get-NcRole


NAME
Get-NcRole

SYNOPSIS
Returns a list of user role objects.

SYNTAX
Get-NcRole [[-Role] <String[]>] [-Vserver <String[]>] [-CommandDirectory <St
ring[]>] [-AccessLevel <String[]>] [-Attributes <SecurityLoginRoleInfo>] [-C
ontroller <NcController[]>] [<CommonParameters>]

Get-NcRole -Template [-Controller <NcController[]>] [<CommonParameters>]

Get-NcRole -Query <SecurityLoginRoleInfo> [-Attributes <SecurityLoginRoleInf
o>] [-Controller <NcController[]>] [<CommonParameters>]


DESCRIPTION
Returns a list of user role objects.


PARAMETERS
-Role <String[]>
Restrict results to the specified role(s). Data ONTAP wildcards are per
mitted.

Required? false
Position? 1
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Vserver <String[]>
Restrict results to the specified vserver(s). Data ONTAP wildcards are
permitted.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-CommandDirectory <String[]>
Restrict results to the specified command(s) or command directories. Da
ta ONTAP wildcards are permitted.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-AccessLevel <String[]>
Restrict results to the specified access level(s). Possible values: 'no
ne', 'readonly', 'all'.

Required? false
Position? named
Default value
Accept pipeline input? true (ByPropertyName)
Accept wildcard characters? false

-Attributes <SecurityLoginRoleInfo>
For improved scalability in large clusters, provide a SecurityLoginRoleI
nfo object with various fields set to indicate which fields to return on
all objects. Undesired fields should remain set to null. Use "GetNcRo
le -Template" to get the initially empty SecurityLoginRoleInfo object.
If not specified, all data is returned for each object.

Required? false
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Controller <NcController[]>
A clustered Data ONTAP controller to receive this cmdlet, as embodied by
an NcController object. This parameter is returned by the Connect-NcCo
ntroller cmdlet. If not specified, the value in the global variable Cur
rentNcController is used. In the latter case, if CurrentNcController co
ntains a collection of NcController objects, this cmdlet is invoked on e
ach controller in succession.

Required? false
Position? named
Default value
Accept pipeline input? true (ByValue, ByPropertyName)
Accept wildcard characters? false

-Template
Specify to get an empty SecurityLoginRoleInfo object for use with advanc
ed queries involving the Query attribute.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

-Query <SecurityLoginRoleInfo>
For advanced queries, provide a SecurityLoginRoleInfo object with variou
s fields set to indicate which records to retrieve. Other fields should
remain set to null. Use "Get-NcRole -Template" to get the initially em
pty SecurityLoginRoleInfo object.

Required? true
Position? named
Default value
Accept pipeline input? false
Accept wildcard characters? false

<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer and OutVariable. For more information, type,
"get-help about_commonparameters".

INPUTS



OUTPUTS
DataONTAP.C.Types.Security.SecurityLoginRoleInfo


NOTES


Category: security
API: security-login-role-get-iter
Family: cluster

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

C:\PS>Get-NcRole rcu


List the capabilities of the 'rcu' role.


RoleName Vserver AccessLevel CommandDirectoryName
-------- ------- ----------- --------------------
rcu dlamotta02 none DEFAULT
rcu dlamotta02 all job
rcu dlamotta02 all lun
rcu dlamotta02 all network connections
rcu dlamotta02 all network interface
rcu dlamotta02 all security login password
rcu dlamotta02 all security login publickey
rcu dlamotta02 all security login role show-ontapi
rcu dlamotta02 all set
rcu dlamotta02 all version
rcu dlamotta02 all volume
rcu dlamotta02 all volume efficiency
rcu dlamotta02 all volume move
rcu dlamotta02 all vserver
rcu dlamotta02 all vserver cifs
rcu dlamotta02 all vserver export-policy
rcu dlamotta02 all vserver locks
rcu dlamotta02 all vserver name-mapping
rcu dlamotta02 all vserver services


-------------- Example 2 --------------

C:\PS>$query = Get-NcRole -Template
$query.Vserver = "costea*"
$query.RoleName = "kamino"
$query.CommandDirectoryName = "vol*"
Get-NcRole -Query $query


Use an advanced query to get the roles matching several criteria.


RoleName Vserver AccessLevel CommandDirectoryName
-------- ------- ----------- --------------------
kamino costea01 all volume
kamino costea01 all volume efficiency
kamino costea01 all volume move
kamino costea02 all volume
kamino costea02 all volume efficiency
kamino costea02 all volume move



RELATED LINKS
New-NcRole
Remove-NcRole
Set-NcRole







 Data ONTAP® PowerShell Toolkit