I’m trying to access and list the directory under the UNC path through post deploy script. Say \10.1.2.3\Directory
I’m using Get-ChildItem $path where $path is an explicitly defined octopus variable.
Get-ChildItem : Cannot find path ‘\10.1.2.3\Directory’ because it does not exist.
However the command works perfectly fine in PowerShell window.
I also have tried using $path = Microsoft.PowerShell.Core\FileSystem::\10.1.2.3\Directory which also throws exactly the same error.
Is there anything I missed?
Tentacle version 18.104.22.1688
Thanks for getting in touch! It appears that you are missing a \ in your path.
Your variable will need to be set to
\\10.1.2.3\Directory or, if it already is, then its counting as an escape so please set it to
Let me know if that resolves this issue!
Thank you for your reply. The variable seems to be correct without needing to escape it.
In the end, we found out that Local System user doesn’t have enough permission to access UNC path.
We created a dedicated user with enough permission to access Tentacle directory and shared directory. That solves our problem.