I am trying to get the latest for a user on a build server. I have created a powershell script to do this and the script finishes successfully but the folder isn't updated. If I open a powershell session and go through line by line typing them out manually it works. But running the script does not.
$tf = 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\TF.exe '
$s = New-PSSession -ComputerName server -Credential user
Invoke-Command $s -ScriptBlock{
cd c:\inetpub\wwwroot\sqlwebservice
& $args[0] @('get ', '. ', '/r')
cd SyncService
dir
exit
} -ArgumentList ($tf)
Pause
Any ideas? Thanks.