Powershell - Test-Path

I have a simple piece of Powershell that looks like :

 

If (Test-Path("\\Server\Downloads\Company\Client\Release"))
{
Write-Output "Path Found."
}
else
{
Write-Output "Path not Found."
}

 

When I run this using Powershell ISE and select "Run as" and enter the account that the Teamcity server executes as the script returns "Path Found.". Where as when its executed in TeamCity Powershell step it returns "Path not Found.".

 

The solution has to be obvious, but it evades me !

 

Powershell settings :

Platform : x86

Edition : Desktop

Execution Mode : .ps1 from external file.

Options : No profile not checked.

 

 

 

 

0
1 comment
Avatar
Permanently deleted user

Close please.

 

I tracked the issue down to a domain issue and the paths needing to be fully qualified.

0

Please sign in to leave a comment.