PowerShell is a command-line tool which allows you to run commands and scripts, to change system settings and automate tasks.
It can, for example, be used in the Process Triggers tab of the Events panel of the CompleteFTP Manager, to check that the information of the events is saved in the created file in the script.
This script checks that the Upload file event works properly, with the PowerShell script type.
# Create a PowerShell_Result.txt file in C:\Temp contains the information of the newly uploaded file
$path = 'C:\Temp\PowerShell_Result.txt'
$value = '%FileName% has been uploaded by %LoginUserName% at %Time%'
Add-Content -path $path -Value $value
1. Go to the "Process Triggers" tab, add a new process trigger for an Upload file event.
2. Configure the process trigger as follows:
3. Input the above script with PowerShell Script, then 'Apply changes'.
4. From your FTP client, connect to the CompleteFTP server with the user user1 and upload a file to the server -> Verify that the user is logged in and that the upload is successful.
5. Navigate to C:\Temp and verify that there is a PowerShell_Result.txt file, which contains the information of the newly uploaded file.