| external help file | ConnectWiseManageAPI-help.xml |
|---|---|
| Module Name | ConnectWiseManageAPI |
| online version | https://marketplace.connectwise.com/docs/redoc/manage/company.html#tag/ContactCommunications/paths/~1company~1contacts~1{id}~1communications/post |
| schema | 2.0.0 |
Will allow you to upload a document and attach it to an item.
New-CWMDocument [-recordType] <String> [-recordId] <Int32> [-title] <String> -URL <String>
[[-Private] <Boolean>] [[-ReadOnly] <Boolean>] [-isAvatar <Boolean>] [-WhatIf] [-Confirm] [<CommonParameters>]
New-CWMDocument [-recordType] <String> [-recordId] <Int32> [-title] <String> [-FilePath] <FileInfo>
[[-FileName] <String>] [[-Private] <Boolean>] [[-ReadOnly] <Boolean>] [-isAvatar <Boolean>] [-WhatIf]
[-Confirm] [<CommonParameters>]
Will allow you to upload a document and attach it to an item. You can also set some permissions for the document.
PS C:\> New-CWMDocument -recordType 'Ticket' -recordId 123 -title 'NewDoc' -FilePath 'C:\temp\test.txt'Will upload test.txt to the ticket 123 with a title of NewDoc.
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseName of the file when uploaded. Will default to the original file name.
Type: String
Parameter Sets: File
Aliases:
Required: False
Position: 4
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseFull path to the file to be uploaded.
Type: FileInfo
Parameter Sets: File
Aliases:
Required: True
Position: 3
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseIf true the document will not be shown in the customer portal.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 5
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseIf true only the owner can update the file.
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: 6
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseShows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe ID of the item you are attaching the document to.
Type: Int32
Parameter Sets: (All)
Aliases:
Required: True
Position: 1
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThe type of record are you trying to attach the document to.
Type: String
Parameter Sets: (All)
Aliases:
Accepted values: Ticket, Agreement, Company, Configuration, Contact, Expense, Opportunity, PurchaseOrder, Project, SalesOrder, ServiceTemplate, Rma
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseTitle of the uploaded document.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 2
Default value: None
Accept pipeline input: False
Accept wildcard characters: False{{ Fill isAvatar Description }}
Type: Boolean
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False{{ Fill URL Description }}
Type: String
Parameter Sets: URL
Aliases:
Required: True
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: FalseThis cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Author: Chris Taylor Date: 7/2/2020
https://developer.connectwise.com/Products/Manage/REST#/Documents/getSystemDocumentsUploadsample