VisualCron – Powershell Network Path Truncation

I set up a VisualCron job to kick off a Powershell script to reach out to certain directories – built dynamically from an array – to check for content. The script ran perfectly when invoked manually, but through VisualCron it would error out with a truncated path:

The above path should have been \\atldireng03\e$\download\. I just could not get the path to resolve. The script that builds the path looks similar to this:

Ultimately the issue was one of rights. The account VisualCron was utilizing to invoke the script did not have rights to the administrative share path being built by the script. Change the account to an administrator on the remote server and the script ran like a charm. Now, that it would error out with this weird truncated path problem rather than something referring to a lack of sufficient rights is frustrating. I suppose it’s because it could not ‘see’ the path (hence “it does not exist”), but were you to manually attempt to map to a path you hadn’t rights to pretty much all OSes would return you some kind of informative error about insufficient rights. Not here. And for the record, I haven’t tried running the script manually through a Powershell prompt without rights to the paths to see what happens. It’s entirely probable this uninformative error is on Powershell’s side and not VisualCron.

Post a comment

You may use the following HTML:
<a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code class="" title="" data-url=""> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong> <pre class="" title="" data-url=""> <span class="" title="" data-url="">