My first attempt to use Powershell is proving frustrating:
I have a SQL 2008R2 server and two other Win 2003 servers sitting outside the domain. I need to sync a directory between the two 2003 boxes, and I wanted to use a PS step in a SQL job to do it rather than installing an app to do it. I have a user on each box with matching username & password that has access to the shares involved. I already have an SSIS job running (and working) on the SQL server that proxies that account and accesses the share.
I added Powershell to the existing proxy, and created a new job & step (job owner is sa, run as proxy account). Write-Output $env:username returns the proxied login, but gci \\10.0.0.1\Share returns: "Cannot find path '\\10.0.0.1\Share' because it does not exist."
It works fine from SQLPS, and the job works for local paths (even w/ the loopback IP). I cannot figure out why the path doesn't work when the proxy is working and the user has permissions.