< Back

Add-PTag

Sat Jan 18, 2020 7:25 pm

NAME Add-PTag



SYNOPSIS

Adds a tag to a particular person.





SYNTAX

Add-PTag [-PopuliUri] <String> [-PopuliAuthkey] <String> -PersonId <Int32> -TagName <String> [<CommonParameters>]



Add-PTag [-PopuliUri] <String> [-PopuliAuthkey] <String> -PersonId <Int32> -TagId <Int32> [<CommonParameters>]





DESCRIPTION

Adds a tag from a particular person using the given parameters. Review the parameters for specific requirements

and settings. If you pass "tag" and that tag doesn't exist, it will be created. If you pass in a tag_id that

doesn't exists, a BAD_PARAMETER error will be thrown.

The same tag cannot be attached multiple times to the same person - if the person already has this tag, addTag

will return SUCCESS and do nothing.

System tags cannot be assigned by anyone other than Populi... so certain tags like "Expelled" are off-limits. To

add these tags, you'll need to take some action

in Populi - the correct system tags will be added as a byproduct of that action.





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.

You must have the Staff role to call this task.

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 who should be tagged.

This parameter Required.



Required? true

Position? named

Default value 0

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-TagId <Int32>

Numeric ID of the tag. See Get-PTags cmdlet for list of TagId and TagName.

This parameter is not required (but either tag_id or tag must be set)



Required? true

Position? named

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-TagName <String>

The actual tag you want to be added (e.g. "Do not call", or "Good reference").

See Get-PTags cmdlet for list of TagId and TagName.

This parameter is not required (but either tag_id or tag must be set)



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

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



INPUTS



OUTPUTS

Returns PowerShell objects:

SUCCESS or FAILURE





NOTES





Author: Matthew Rehm

Creation Date: 01/02/2019



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



Add-PTag -PopuliUri 'https://<YOUR_SUBDOMAIN_HERE>.populiweb.com/api/ -PopuliAuthkey '123456789' -PersonId

'7857760' -TagId '12345'













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



Add-PTag -PopuliUri 'https://<YOUR_SUBDOMAIN_HERE>.populiweb.com/api/ -PopuliAuthkey '123456789' -PersonId

'7857760' -TagName "Test"













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



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



$PopuliCredentials = @{

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

PopuliAuthkey = '1ReallyLongAlphaNumericSequence'

}

Add-PTag @PopuliCredentials -PersonId '7781234' -TagId '12345'











RELATED LINKS