< Back

Get-PRoleMembers

Sat Jan 18, 2020 7:28 pm

NAME Get-PRoleMembers



SYNOPSIS

Returns members of a particular role.





SYNTAX

Get-PRoleMembers [-PopuliUri] <String> [-PopuliAuthkey] <String> -RoleName <String> [-Status <String>]

[<CommonParameters>]



Get-PRoleMembers [-PopuliUri] <String> [-PopuliAuthkey] <String> -RoleId <Int32> [-Status <String>]

[<CommonParameters>]





DESCRIPTION

You must have the Staff role to call this task. There is a limit of 1000 results in the response.





PARAMETERS

-PopuliUri <String>

Set to the correct URL for your college (i.e. https://<YOUR_SUBDOMAIN_HERE>.populiweb.com/api/).

This parameter is required.



Required? true

Position? 1

Default value

Accept pipeline input? false

Accept wildcard characters? false



-PopuliAuthkey <String>

The authentication key with necessary permissions for the data you are requesting.

This parameter is required.



Required? true

Position? 2

Default value

Accept pipeline input? false

Accept wildcard characters? false



-RoleId <Int32>

Numeric ID of the role. Either RoleId OR RoleName MUST be set.



Required? true

Position? named

Default value 0

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-RoleName <String>

Name of the role. Either RoleId OR RoleName MUST be set.



Required? true

Position? named

Default value

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-Status <String>

Possible values: ACTIVE (default), INACTIVE, and ALL.



Required? false

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, PipelineVariable, and OutVariable. For more information, see

about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).



INPUTS



OUTPUTS

Returns PowerShell objects:

PersonID

FirstName

LastName

Inactive (1=Yes / 0=No)

UserName





NOTES





Author: Matthew Rehm

Creation Date: 02/14/2019

Updated: 03/06/2019



-------------------------- EXAMPLE 1 --------------------------



PS C:\\>Get-PRoleMembers @PopuliCredentials -RoleName "Faculty"













-------------------------- EXAMPLE 2 --------------------------



PS C:\\>Get-PRoleMembers @PopuliCredentials -RoleName "Staff" | Get-PPerson @PopuliCredentials -Property

FirstName,LastName,WorkEmail,WorkPhone













-------------------------- EXAMPLE 3 --------------------------



PS C:\\>#Store your Populi Credentials in a hash table:



$PopuliCredentials = @{

PopuliURI = https://<YOUR_SUBDOMAIN_HERE>.populiweb.com/api/

PopuliAuthkey = '1ReallyLongAlphaNumericSequence'

}

Get-PRoleMembers @PopuliCredentials











RELATED LINKS