I’m trying to deploy a script through Hexnode that needs to use an XML file. If I upload the XML file to the Content tab, is there a way for the script to know where that file is stored and reference it during execution?
I’m trying to deploy a script through Hexnode that needs to use an XML file. If I upload the XML file to the Content tab, is there a way for the script to know where that file is stored and reference it during execution?
Hello @ame-lie ,
The files uploaded to the Content tab cannot be directly referenced during script execution. The Content section is meant for distributing files to devices, but it does not expose a script-accessible file reference or direct path that a script can automatically use.
For a script that depends on an XML or any other supporting file, use one of these approaches:
If the environment does not allow external hosting, use an internal server or approved private repository that the managed devices can reach.
Regards,
Simon Scott
Hexnode UEM
We had a similar setup with a configuration XML. We ended up hosting the XML internally and added the download step at the beginning of the PowerShell script. Once the XML was saved locally, the rest of the script worked normally.
For stricter environments where hosting the payload externally is not preferred, check whether the configuration can be delivered through Hexnode’s advanced custom configuration options instead of being pulled by a script. On supported platforms, OMA-URI based custom configurations can be used to deliver certain policy or configuration payloads natively, depending on what the endpoint OS supports.
Don't have an account? Sign up