< Back
Add-PRole
Post
NAME Add-PRole
SYNOPSIS
Adds a role to a person.
SYNTAX
Add-PRole [-PopuliUri] <String> [-PopuliAuthkey] <String> [-PersonId] <Int32> [-RoleId] <Int32>
[<CommonParameters>]
DESCRIPTION
The current user must have the Staff role and permission to add the role (this varies by role... so Academic
Admins can add the Registrar role,
Admissions Admins can add the Admission role, etc).
See Get-PAvailableRoles to look up all possible roles and their numeric IDs.
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
-PersonId <Int32>
Numeric ID of the person you're interested in.
This parameter is required.
Required? true
Position? 3
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-RoleId <Int32>
The numeric ID of the role you want to add. See Get-PRoles cmdlet to find RoleId.
This parameter is required.
Required? true
Position? 4
Default value 0
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:
Result = SUCCESS (or FAILURE)
NOTES
Author: Matthew Rehm
Creation Date: 02/15/2019
-------------------------- EXAMPLE 1 --------------------------
Add-PRole -PopuliUri 'https://<YOUR_SUBDOMAIN_HERE>.populiweb.com/api/ -PopuliAuthkey '1234567890' -PersonId
7857760 -RoleId 3
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>#Store your Populi Credentials in a hash table:
$PopuliCredentials = @{
PopuliURI = https://<YOUR_SUBDOMAIN_HERE>.populiweb.com/api/
PopuliAuthkey = '1ReallyLongAlphaNumericSequence'
}
Add-PRole @PopuliCredentials -PersonId 7857760 -RoleId 3
RELATED LINKS
SYNOPSIS
Adds a role to a person.
SYNTAX
Add-PRole [-PopuliUri] <String> [-PopuliAuthkey] <String> [-PersonId] <Int32> [-RoleId] <Int32>
[<CommonParameters>]
DESCRIPTION
The current user must have the Staff role and permission to add the role (this varies by role... so Academic
Admins can add the Registrar role,
Admissions Admins can add the Admission role, etc).
See Get-PAvailableRoles to look up all possible roles and their numeric IDs.
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
-PersonId <Int32>
Numeric ID of the person you're interested in.
This parameter is required.
Required? true
Position? 3
Default value 0
Accept pipeline input? false
Accept wildcard characters? false
-RoleId <Int32>
The numeric ID of the role you want to add. See Get-PRoles cmdlet to find RoleId.
This parameter is required.
Required? true
Position? 4
Default value 0
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:
Result = SUCCESS (or FAILURE)
NOTES
Author: Matthew Rehm
Creation Date: 02/15/2019
-------------------------- EXAMPLE 1 --------------------------
Add-PRole -PopuliUri 'https://<YOUR_SUBDOMAIN_HERE>.populiweb.com/api/ -PopuliAuthkey '1234567890' -PersonId
7857760 -RoleId 3
-------------------------- EXAMPLE 2 --------------------------
PS C:\\>#Store your Populi Credentials in a hash table:
$PopuliCredentials = @{
PopuliURI = https://<YOUR_SUBDOMAIN_HERE>.populiweb.com/api/
PopuliAuthkey = '1ReallyLongAlphaNumericSequence'
}
Add-PRole @PopuliCredentials -PersonId 7857760 -RoleId 3
RELATED LINKS