Folks, I’m in bit of a pickle right now. I’ve been trying to deploy a file into my macOS devices at the workplace using the Deploy custom configuration feature through Hexnode. But it seems I am unable to upload the file which in .txt and .csv formats. So, anyone got an idea how to get out of this?
File deployment on devicesSolved
Replies (5)
@noah-blake , for Deploy custom configuration feature in Macs to work, your file must be in .mobileconfig, .xml, or .plist files formats. This effectively means that you cannot simply upload arbitrary files like the ones you mentioned. The feature is mainly used to deploy profile configuration files which are primarily in .mobileconfig and .plist files for Macs.
Oh, that makes sense.
How do I deploy files on Windows devices? Is there a policy feature for file deployment like we have for Android devices?
@carter , after some digging in the forum I’ve found the solution. This is the solution that I found–> https://www.hexnode.com/forums/topic/deploy-files-to-windows-devices/. So basically, the solution talks about deploying .pdf files in Windows devices. So, I’ve modified the script to fit your case of deploying files in general.
|
1 2 3 4 5 6 7 8 9 10 11 |
$fileUrl = " " $localPath = " " Invoke-WebRequest -Uri $fileUrl -OutFile $localPath if (Test-Path $localPath) { Write-Host "File successfully downloaded and saved to $localPath" } else { Write-Host "Failed to download the file" } |
The file you want to deploy into the devices must be first uploaded to a cloud web server like Google Drive to get its URL. Then use this URL in the place of $fileURL and in $localPath enter the destination path where you want the file to be saved on the device.
This script can then be remotely deployed into your Windows devices using the Execute custom script action in Hexnode.
Thanks, @leo_scott .