user3162626
user3162626

Reputation: 53

Powershell TFS issue

hi when i execute following code:

$hostName = "https://server.visualstudio.com/WebAndMobile/:8080"
$user = "user"
$password =  ConvertTo-SecureString "password" -AsPlainText -Force
$credential =  New-Object System.Management.Automation.PSCredential ($user,$password)
$server=Get-TfsServer -Name $hostName -credential $credential -all

i receive this error

Get-TfsServer : The request was rejected by the server. Technical information: A potentially dangerous Request.Path value was detected from the client (:).

when i delete port 8080 from address i get Access denied. Do you know why ?

Upvotes: 0

Views: 165

Answers (2)

Niel Zeeman
Niel Zeeman

Reputation: 677

VSTS is not exposed behind port 8080, it will simply be as you indicated https://server.visualstudio.com/WebAndMobile

Then you need to enable basic authentication for you to pass through credentials : https://www.visualstudio.com/en-us/docs/integrate/get-started/auth/overview

Upvotes: 0

heymega
heymega

Reputation: 9401

Get-TfsServer : The request was rejected by the server. Technical information: A potentially dangerous Request.Path value was detected from the client (:).

Your port number is in the wrong place. You probably don't need to provide this but if you do make sure its in the following format.

https://server.visualstudio.com:8080/WebAndMobile

when i delete port 8080 from address i get Access denied. Do you know why ? Your user mustn't have permissions for the WebAndMobile project.

Upvotes: 1

Related Questions