Kaseya Community

Transfer file step in agent procedures

This question is not answered

Hi,

I'm running a procedure on several agents, that's supposed to transfer a tiny txt-file to another agent. All agents should transfer the file to the same destination agent.

Although only one (or sometimes a couple) of these files get to their destination. I can't see any error indications in the agent logs..

 

Has anyone else been having this problem?

 

/M

All Replies
  • Can you post your procedure so we can look at it?

  • Below is what I get when I export it to XML,

    Although it's strange that the parameters for the 'transfer file' -step is missing.

    I have tried this in several different procedures, and simplified it even more.

    <?xml version="1.0" encoding="utf-8" ?>

    - <ScriptExport xmlns:xsi="www.w3.org/.../XMLSchema-instance" xmlns:xsd="www.w3.org/.../XMLSchema" xmlns="www.kaseya.com/.../Scripting">

    - <Procedure name="TestSPBCK" treePres="3" id="<REMOVED>">

    - <Body description="">

    - <Statement description="Delete the specified file - full path to the filename required." name="DeleteFile" continueOnFail="false">

     <Parameter xsi:type="StringParameter" name="Path" value="C:\temp\#vMachine.ComputerName#.txt" />

     </Statement>

    - <Statement description="Execute the given command as if it were typed in at a command prompt." name="ExecuteShellCommand" continueOnFail="false">

     <Parameter xsi:type="StringParameter" name="Command" value="echo #vMachine.ComputerName# >> C:\temp\#vMachine.ComputerName#.txt" />

     <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />

     <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />

     </Statement>

     <Statement description="Transfer a file from the machine running this procedure to the machine specified below." name="Transfer File" continueOnFail="false" />

     </Body>

     </Procedure>

     </ScriptExport>

  • Could be a permissions  c:\temp is a finicky location.

    PS code tags work now (YAY!!) Use the "Use rich fomatting" option

  • You're using a new 6.1 "Transfer file" step, correct? If so I can take a look at that with you, let me know.

  • @Ben: Yes, that is correct. What do you need to help me out? Thanks

  • I'm having the same problem as @Micke: My procedure runs and creates a file, but the "Transfer File" step seems to work in the following ways:

    1. Run procedure on one computer and wait until file is transferred => transfer completes

    2. Run procedure on one computer, then another, then another without waiting in between => transfer completely only on the last computer

    3. Run the procedure on multiple computers at the same time => transfer completes only on one of the computers

    Using 6.1. Procedure Code follows.

    <?xml version="1.0" encoding="utf-8"?>

    <ScriptExport xmlns:xsi="www.w3.org/.../XMLSchema-instance" xmlns:xsd="www.w3.org/.../XMLSchema" xmlns="www.kaseya.com/.../Scripting">

     <Procedure name="Get-MSI" treePres="3" id="1624390187">

       <Body description="Runs Get-MSI.ps1">

         <Statement description="Create a named procedure variable and assign a value retrieved from the managed machine by the agent." name="GetVariable" continueOnFail="false" osType="Windows">

           <Parameter xsi:type="EnumParameter" name="VariableType" value="MachineGroupID" />

           <Parameter xsi:type="StringParameter" name="SourceContent" value="" />

           <Parameter xsi:type="StringParameter" name="VariableName" value="Name" />

         </Statement>

         <Statement description="Execute the given command as if it were typed in at a command prompt." name="ExecuteShellCommand" continueOnFail="false" osType="Windows">

           <Parameter xsi:type="StringParameter" name="Command" value="powershell -file %windir%\scripts\get-msi.ps1 >>  c:\temp\msi.txt" />

           <Parameter xsi:type="EnumParameter" name="ExecuteAccount" value="System" />

           <Parameter xsi:type="BooleanParameter" name="Is64Bit" value="False" />

         </Statement>

         <Statement description="Transfer a file from the machine running this procedure to the machine specified below." name="Transfer File" continueOnFail="false" osType="Windows" />

       </Body>

     </Procedure>

    </ScriptExport>

  • I am re-writing this step as well as the 'Write File - from agent' step. Stay tuned ;)

  • We experienced the same issue over here, but especially windows 2008 machines sufferd from this.

    After changing c:\kworking to #vAgentConfiguration.agentTempDir# the script works on all windows OS.

  • I updated the Write File and Transfer File procedures, accept my friend requests and I'll send you out the updates. Once I can confirm your issues are resolved we will hotfix out the updates.

  • @ Ben, quick question, where can I find what file types the Transfer File procedure supports?

  • Any news on this matter ?

    transfers not working.

    rgds

  • The issue in this thread was resolved several years ago and there are no known issues with the Transfer File step. If you're seeing a problem I would recommend submitting a support ticket.