< Back
Get-PAvailableRoles
Post
NAME Get-PAvailableRoles
SYNOPSIS
Returns all the roles in Populi (Student, Staff, Admissions, etc).
SYNTAX
Get-PAvailableRoles [-PopuliUri] <String> [-PopuliAuthkey] <String> [<CommonParameters>]
DESCRIPTION
Useful if you'd like to give someone a role but need to know its numeric role_id.
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
<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:
RoleId
RoleName
NOTES
Author: Matthew Rehm
Creation Date: 02/15/2019
-------------------------- EXAMPLE 1 --------------------------
Get-PAvailableRoles -PopuliUri 'https://<YOUR_SUBDOMAIN_HERE>.populiweb.com/api/ -PopuliAuthkey '1234567890'
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>This example uses the ImportExcel module. This will create an excel spreadsheet of all role members of all
the roles and saves them in an Excel file.
Get-PAvailableRoles @PopuliCredentials | Get-PRoleMembers @PopuliCredentials | Export-Excel
C:\\users\\$ENV:USERNAME\\Desktop\\Example.xlsx
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Store your Populi Credentials in a hash table:
$PopuliCredentials = @{
PopuliURI = https://<YOUR_SUBDOMAIN_HERE>.populiweb.com/api/
PopuliAuthkey = '1ReallyLongAlphaNumericSequence'
}
Get-PAvailableRoles @PopuliCredentials
RELATED LINKS
SYNOPSIS
Returns all the roles in Populi (Student, Staff, Admissions, etc).
SYNTAX
Get-PAvailableRoles [-PopuliUri] <String> [-PopuliAuthkey] <String> [<CommonParameters>]
DESCRIPTION
Useful if you'd like to give someone a role but need to know its numeric role_id.
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
<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:
RoleId
RoleName
NOTES
Author: Matthew Rehm
Creation Date: 02/15/2019
-------------------------- EXAMPLE 1 --------------------------
Get-PAvailableRoles -PopuliUri 'https://<YOUR_SUBDOMAIN_HERE>.populiweb.com/api/ -PopuliAuthkey '1234567890'
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>This example uses the ImportExcel module. This will create an excel spreadsheet of all role members of all
the roles and saves them in an Excel file.
Get-PAvailableRoles @PopuliCredentials | Get-PRoleMembers @PopuliCredentials | Export-Excel
C:\\users\\$ENV:USERNAME\\Desktop\\Example.xlsx
-------------------------- EXAMPLE 3 --------------------------
PS C:\\>Store your Populi Credentials in a hash table:
$PopuliCredentials = @{
PopuliURI = https://<YOUR_SUBDOMAIN_HERE>.populiweb.com/api/
PopuliAuthkey = '1ReallyLongAlphaNumericSequence'
}
Get-PAvailableRoles @PopuliCredentials
RELATED LINKS