2017-02-16 86 views
0

我在我的代理上設置了防火牆,關閉了除一臺服務器之外的所有TCP連接,我正在使用this VSTS任務將網站部署到。VSTS代理配置的防火牆

PowerShell是沒有在這條線:

$environment = Register-Environment -EnvironmentName $environmentName -EnvironmentSpecification $environmentName -UserName $adminUserName -Password $adminPassword -WinRmProtocol $protocol -TestCertificate ($testCertificate -eq "true") -Connection $connection -TaskContext $distributedTaskContext -ResourceFilter $machineFilter 

沒有防火牆的一切工作正常。

我應該添加什麼規則/端口到防火牆來阻止此錯誤?

+0

當PowerShell失敗時,你會得到什麼信息? –

+0

@ Marina-MSFT System.Management.Automation.ActionPreferenceStopException:由於首選變量「ErrorActionPreference」或通用參數設置爲「停止」,運行命令停止:發送請求時發生錯誤。 –

+0

@ Marina-MSFT大約需要1分鐘,在超時後失敗我猜 –

回答

0

我打開端口443作爲源端口,使其工作。

0

您需要啓用WinRM端口。

從提升的PowerShell運行Enable-PSRemoting –force

+0

我使用外部防火牆,端口5986和5985已啓用。沒有外部防火牆,在Windows防火牆上一切正常 –

相關問題