< Back

Upload-PFile

Sat Jan 18, 2020 7:31 pm

NAME Upload-PFile



SYNOPSIS

Uploads a file for a particular person.





SYNTAX

Upload-PFile [-PopuliUri] <String> [-PopuliAuthkey] <String> [-PersonId] <Int32> [-FilePath] <String>

[[-CustomFieldId] <Int32>] [[-TermId] <Int32>] [[-RoleIds] <Int32>] [<CommonParameters>]





DESCRIPTION

You must have the Staff role to call this task.

Returns the FileId on success.

The RoleIds parameter will not be used for custom info fields.

If no role_ids are passed in we will default to the user's "Default activity feed visibility" setting.

If you pass in CustomFieldId you will not need to call Set-PCustomField, we will set the field for you.





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>

The numeric ID of the person.

This parameter is required.



Required? true

Position? 3

Default value 0

Accept pipeline input? true (ByValue, ByPropertyName)

Accept wildcard characters? false



-FilePath <String>

Path of file to be uploaded. Enter the full path, inculding the filename.

This parameter is required.



Required? true

Position? 4

Default value

Accept pipeline input? false

Accept wildcard characters? false



-CustomFieldId <Int32>

If passed in, the file will be uploaded to the given custom info field.

You can get the CustomFieldId you want by running Get-PAllCustomField or Get-PCustomFields.



Required? false

Position? 5

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-TermId <Int32>

The numeric ID of the term you're interested in.

(Must be set for TERM_STUDENT custom fields.)



Required? false

Position? 6

Default value 0

Accept pipeline input? false

Accept wildcard characters? false



-RoleIds <Int32>

An array of role IDs - the file will be visible to people with these role IDs.



Required? false

Position? 7

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:

FileId





NOTES





Author: Matthew Rehm

Creation Date: 10/03/2019



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



PS C:\\>Upload-PFile @populicredentials -PersonId '7857760' -FilePath "c:\\test\\test.pdf"













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



PS C:\\>Upload-PFile @populicredentials -PersonId '7857760' -FilePath "c:\\test\\test.pdf" -CustomFieldId '189607'















RELATED LINKS