Adding Attachments to a Request in PowerShell
Requirement:
This article guides users on how to add attachments to a request in PowerShell from a specific location. The provided PowerShell script simplifies the process of appending attachments to a request, facilitating efficient automation.
Steps to follow:
- Extract the zip in the location: <sdp_home>\integration\custom_scripts
- Update the script the below informations:
- Hosted build info and Technician key - Refer: https://pitstop.manageengine.com/portal/en/kb/articles/creating-integration-key
- File name and file path.
- Create a text file addAttachment.txt in [SDP_Home]\integration\custom_scripts\executor_files directory.
- Sample content: powershell.exe appendAttachmentToRequest.ps1 $COMPLETE_V3_JSON_FILE
- Create a custom trigger: Goto Admin > Custom Trigger > Action Type: Execute Script addAttachment.txt
- Configure this trigger to get invoked for every ticket being created. Invoking condition can be modified as per requirement.
New to ADSelfService Plus?