Skip to main content
Solved

Worklet with an uploaded file


Forum|alt.badge.img
  • Rookie
  • 1 reply

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 !

Best answer by JohnG-Automox

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!

 

View original
How helpful was this post to you?

2 replies

JohnG-Automox
Forum|alt.badge.img
  • Automox Employee
  • 121 replies
  • Answer
  • May 25, 2023

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!

 


Forum|alt.badge.img
  • Author
  • Rookie
  • 1 reply
  • May 25, 2023

Hello !

That works ! Thanks for your help !


Reply


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings