Solved

Worklet with an uploaded file

  • 24 May 2023
  • 2 replies
  • 230 views

Badge

Hi, I have uploaded a file named “config” to the remediation code, and I want to copy it to the directory "/usr/local/bin"

In the script I tried using :

Copy-Item .\config -Destination “/usr/local/bin”

but it didn’t work.

Could somebody help me ? Thanks in advance !

icon

Best answer by JohnG-Automox 25 May 2023, 14:19

View original

2 replies

Userlevel 3

Hi @Ivy!

There’s a worklet in our Catalog named Windows - Configuration - Copy File from Payload that should help with this!

https://console.automox.com/manage/worklet-catalog/244

 

In this worklet, you’ll upload your desired file to the worklet’s payload.  You’ll then need to complete the $filename variable with the name of the file you want to copy to the device, and then $filepath will be the target destination for your file. This should be configured in both the evaluation and remediation code blocks:

 

If you wish to use your code instead, you’ll want to include the full file name, including the file extension. And for the file path, you’ll want to use the absolute file path instead of a relative one.

 

I hope this helps!


Have a great day!

 

Badge

Hello !

That works ! Thanks for your help !

Reply