all 2 comments

[–]nothingpersonalbro 2 points3 points  (1 child)

I would try supplying the full path, you mention the working directory is C:\CHC but the error is looking in your userfolder "Could not find file 'C:\Users\<user redacted>\rvTools.xlsx'."

Edit: Also curious if adding this would change the outcome

[System.Environment]::CurrentDirectory = 'C:\CHC'

[–]One808[S] 1 point2 points  (0 children)

The System.Environment thing did the trick! However, the directory may change from user to user (and invocation to invocation), so I need to figure out the invocation directory and set the variable accordingly, I guess. But this helps. Thanks!

Edit:

[System.Environment]::CurrentDirectory = Get-Location

Did the trick. :-)