Deploy an agent on Windows

 https://www.visualstudio.com/zh-cn/docs/build/actions/agents/v2-windows

Last Update: 6/27/2017

Team Services | TFS 2017 | TFS 2015 | Previous versions (XAML builds)

To build and deploy Windows, Azure, and other Visual Studio solutions you'll need at least one Windows agent. Windows agents can also build Java and Android apps.

Before you begin:

Learn about agents

If you already know what an agent is and how it works, feel free to jump right in to the following sections. But if you'd like some more background about what they do and how they work, see Build and release agents.

Check prerequisites

Make sure your machine is prepared with our Windows system prerequisites.

If you're building from a Subversion repo, you must install the Subversion client on the machine.

Prepare permissions

Decide which user you'll use

Decide which user account you're going to use to register the agent.

Authenticate with a personal access token (PAT) to Team Services or TFS 2017
  1. Sign in with the user account you plan to use in either your Visual Studio Team Services account (https://{your-account}.visualstudio.com) or your Team Foundation Server web portal (https://{your-server}:8080/tfs/).

  2. From your home page, open your profile. Go to your security details.

    test

  3. Create a personal access token.

    test

  4. For the scope select Agent Pools (read, manage) and make sure all the other boxes are cleared. If its a deployment group agent, for the scope select Deployment group (read, manage) and make sure all the other boxes are cleared.

  5. Copy the token. You'll use this token when you configure the agent.

Authenticate as TFS user
  • TFS 2017: You can use either a domain user or a local Windows user on each of your TFS application tiers.

  • TFS 2015 (applies only to OSX and Linux): We recommend that you create a local Windows user on each of your TFS application tiers and dedicate that user for the purpose of deploying build agents.

Confirm the user has permission

Make sure the user account that you're going to use has permission to register the agent.

Is the user you plan to use is a Team Services account owner or a TFS server administrator? If so, then skip these steps. Otherwise you might see a message like this: Sorry, we couldn't add the identity. Please try a different identity.

  1. Open a browser and navigate to the Agent pools tab for your Team Services account or TFS server:
    • Team Services: https://{your_account}.visualstudio.com/_admin/_AgentPool
    • TFS 2017: https://{your_server}/tfs/DefaultCollection/_admin/_AgentPool
    • TFS 2015: http://{your_server}:8080/tfs/_admin/_AgentPool

    The TFS URL doesn't work for me. How can I get the correct URL?

  2. Click the pool on the left side of the page and then click Roles.
  3. If the user account you're going to use is not shown, then get an administrator to add it. The administrator can be an agent pool administrator, a Team Services account owner, or a TFS server administrator. If its a deployment group agent, the administrator can be an deployment group administrator, a Team Services account owner, or a TFS server administrator. You can add a user to the deployment group adminstrator role in the Security tab on the Deployment Groups page of the Build & Release hub.

Q: I'm concerned about security. How is this account used? A: Agent communication.

Download and configure the agent

  1. Log on to the machine using the account for which you've prepared permissions as explained above.
  2. In your web browser, sign on to Team Services or TFS, and navigate to the Agent pools tab:
    • Team Services: https://{your_account}.visualstudio.com/_admin/_AgentPool
    • TFS 2017: https://{your_server}/tfs/DefaultCollection/_admin/_AgentPool
    • TFS 2015: http://{your_server}:8080/tfs/_admin/_AgentPool

    The TFS URL doesn't work for me. How can I get the correct URL?

  3. Click Download agent.
  4. On the Get agent dialog box, click Windows.
  5. Click the Download button.
  6. Follow the instructions on the page.

Server URL

  • Team Services: https://{your-account}.visualstudio.com

  • TFS 2017: https://{your_server}/tfs

  • TFS 2015: http://{your-server}:8080/tfs

Authentication type

Team Services

Choose PAT, and then paste the PAT token you created into the command prompt window.

TFS
IMPORTANT

Make sure your server is configured to support the authentication method you want to use.

When you configure your agent to connect to TFS, you've got the following options:

  • Alternate Connect to TFS using Basic authentication. After you select Alternate you'll be prompted for your credentials.

  • Negotiate Connect to TFS as a user other than the signed-in user via a Windows authentication scheme such as NTLM or Kerberos. After you select Negotiate you'll be prompted for credentials.

  • Integrated (Default) Connect a Windows agent to TFS using the credentials of the signed-in user via a Windows authentication scheme such as NTLM or Kerberos. You won't be prompted for credentials after you choose this method.

  • PAT Supported only on Team Services and TFS 2017 or newer. After you choose PAT, paste the PAT token you created into the command prompt window.

NOTE

When using PAT as the authentication method, the PAT token is used only for the initial configuration of the agent. Learn more at Communication with Team Services or TFS.

Choose interactive or service mode

For guidance on whether to run the agent in interactive mode or as a service, see Agents: Interactive vs. service.

If you configured the agent to run interactively, to run it:

.\run.cmd
 

If you configured the agent to run as a service, it starts automatically. You can view and control the agent running status from the services snap-in. Run services.msc and look for "VSTS Agent (name of your agent)".

If you need to change the logon account, don't do it from the services snap-in. Instead, see the information below to re-configure the agent.

Replace an agent

When you configure an agent using the same name as an agent that already exists, you're asked if you want to replace the existing agent. If you answer Y, then make sure you remove the agent (see below) that you're replacing. Otherwise after a few minutes of conflicts, one of the agents will shut down.

Remove and re-configure an agent

To remove the agent:

.\config remove
 

After you've removed the agent, you can configure it again.

Help on other options

To learn about other options:

.\config --help
 

The help provides information on authentication alternatives and unattended configuration.

Capabilities

Your agent's capabilities are cataloged and advertised in the pool so that only the builds and releases it can handle are assigned to it. See Build and release agent capabilities.

In many cases after you deploy an agent you'll need to install software or utilities. Generally you should install on your agents whatever software and tools you use on your dev machine.

For example, if your build includes the npm task, then the build won't run unless there's a build agent in the pool that has npm installed.

IMPORTANT

After you install new software on a agent, you must restart the agent for the new capability to show up in the pool so that the build can run.

Q&A

I'm running a firewall and my code is in Team Services. What URLs does the agent need to communicate with?

If you're running an agent in a secure network behind a firewall, make sure the agent can initiate communication with the following URLs:

https://login.microsoftonline.com
https://app.vssps.visualstudio.com 
https://{accountname}.visualstudio.com https://{accountname}.vsrm.visualstudio.com 
 

How do I configure the agent to work through a web proxy and connect to Team Services?

In the agent root directory, create a .proxy file with your proxy server URL.

echo http://name-of-your-proxy-server:8888 | Out-File .proxy
 

If your proxy doesn't require authentication, then you're ready to configure and run the agent as explained above.

NOTE

For backwards compatibility, if the proxy is not specified as described above, the agent also checks for a proxy URL from the VSTS_HTTP_PROXY environment variable.

If your proxy requires authentication, the simplest way to handle it is to grant permissions to the user under which the agent runs. Otherwise, you can provide credentials through environment variables. When you provide credentials through environment variables, the agent keeps the credentials secret by masking them in job and diagnostic logs. To grant credentials through environment variables, set the following variables:

$env:VSTS_HTTP_PROXY_USERNAME = "proxyuser"
$env:VSTS_HTTP_PROXY_PASSWORD = "proxypassword"
 
NOTE

This procedure enables the agent infrastructure to operate behind a web proxy. Your build definition and scripts must still handle proxy configuration for each task and tool you run in your build. For example, if you are using a task that makes a REST API call, you must configure the proxy for that task.

How do I configure the agent to bypass a web proxy and connect to Team Services?

If you want the agent to bypass your proxy and connect to Team Services directly, then you should configure your web proxy to enable the agent to access the following URLs:

  • https://management.core.windows.net

  • *.visualstudio.com

  • https://login.microsoftonline.com

  • https://app.vsspsext.visualstudio.com

NOTE

This procedure enables the agent to bypass a web proxy. Your build definition and scripts must still handle bypassing your web proxy for each task and tool you run in your build.

For example, if you are using a NuGet task, you must configure your web proxy to support bypassing the URL for the server that hosts the NuGet feed you're using.

I'm using TFS and the URLs in the sections above don't work for me. Where can I get help?

Web site settings and security

I use Team Foundation Server on-premises and I don't see some of these features. Why not?

Some of these features are available only on Visual Studio Team Services and not yet available on-premises. Some features are available on-premises if you have upgraded to the latest version of TFS.

转载于:https://www.cnblogs.com/vivianlou/p/7182515.html

Nessus Agent vs 密码扫描:在Windows服务器合规审计中,我为什么最终选择了Agent模式? 本文探讨了Nessus Agent模式在Windows服务器合规审计中的显著优势,相比传统密码扫描方式,Agent模式在网络架构适应性、认证机制安全性和大规模部署效率方面表现更优。通过实际案例和性能测试数据,展示了Agent模式如何提升70%的扫描效率,同时满足严格的合规要求,特别适用于金融等高度监管行业。 阅读详情

相关推荐

Windows上Hermes Agent部署的Token自由实践指南

Token自由并非营销概念,而是指在AI Agent部署中对API密钥等敏感凭证的可控加载、安全存储与隔离运行能力。其核心原理源于环境变量管理、文件系统权限控制与进程生命周期治理三者协同;技术价值在于规避密钥泄露、配置污染与跨平台路径混乱等工程风险;典型应用场景包括WSL2/Linux子系统下多模型(Ollama/Claude)混合调用、systemd服务持久化及跨网络API通信。本文聚焦Windows平台,结合Hermes Agent实战,详解如何通过Linux原生路径隔离、systemd环境文件注入与9

chikuai9995的博客 482

deploy-agent:自动部署代理,可在您的服务器上安装

连续部署代理 硕士: 开发 : 自动化的部署代理程序,可在您的服务器上安装。 它基于项目的webhooks管理自动部署工作流。 要求 PHP 5.5以上 PHP mcrypt扩展 sqlite或其他与理论兼容的SGBD(sqlite当前是唯一受正式支持的版本) :warning: 默认情况下未安装PHP sqlite扩展。 通过Docker安装(容器服务) 您可以将我们的用作容器服务。 该容器与服务器的其余部分隔离,因此您不必担心服务器的依赖性或安全性。 感谢向报告。 通过Composer安装 下载 : curl -sS https://getcomposer.org/composer.pha

Hermes Agent原生Windows安装实战:告别WSL的AI智能体部署

AI智能体(Agent)是大模型落地的关键形态,其核心在于将LLM能力封装为可调度、可编排、可自治的数字员工。在Windows平台,传统依赖WSL运行Agent存在启动慢、内存高、权限复杂、数据隔离难等工程瓶颈。本文聚焦‘原生Windows运行时’这一技术路径,解析PowerShell驱动安装、PortableGit轻量POSIX层、UTF-8控制台修复、计划任务守护进程四大关键技术支柱,阐明如何绕过Linux兼容层,直接利用Windows原生能力(如用户级PATH、schtasks、DPAPI加密、%LO

weixin_34384681的博客 510

CALDERA入门(1)(自学笔记)

CALDERA入门(1) 部署代理(链接靶机) 1.选择agents模块,打开模块后,先点击” deploy an agent(部署一个代理) 2.然后根据我们的需求选择payload类型和靶机的操作系统,我选择的54ndc47(sandcat) 3.在这里我选择linux系统的payload 4.app.contact.http这一栏输入CALDERA服务端的IP和端口号(默认8888)。如果不知道服务端的IP可在shell中输入命令ifconfig -a 5.复制任意一个payload,在靶机的sh

qq_42239005的博客 1819

windows下sc create命令行添加/创建/修改服务

windows下sc create命令行添加/创建/修改服务 windows下sc create命令行添加/创建/修改服务 sc create BITS binpath= "C:\WINDOWS\system32\svchost.exe -k netsvcs" type= share start= auto displayname= "Background Intelligent Tran

haiross的专栏 6万+

[转帖]PB中可使用的Windows API调用简介

  PB中可使用的Windows API调用简介   来自:www.sybase.com.cn Lists the PowerBuilder syntax for calling Windows API functions. Also included is the PowerBuilder script needed to make the function calls 32 Bit - Win

HAHA 5484

Windows本地AI助手零门槛部署:Hermes Agent与OpenClaw实战指南

AI Agent是面向业务自动化的智能工作流引擎,其核心原理在于将大模型能力封装为可编排、可审计、可集成的技能服务。技术价值体现在降低非技术人员使用AI的准入门槛,尤其在数据不出内网、无GPU、无Linux环境等受限场景下凸显优势。典型应用场景包括企业知识库问答、高校AI教学实训、行政办公自动化(如会议录音转纪要)等。本文聚焦Windows原生支持这一关键突破点,结合Hermes Agent网关抽象与OpenClaw技能编排能力,提供一套不依赖Docker、不强制WSL、不需运维介入的端到端落地方案,真正实

chunqingtai2922的博客 471

Zabbix Agent2在Linux/Windows双平台自动化部署与主动注册实战指南

本文详细介绍了Zabbix Agent2在Linux和Windows双平台上的自动化部署与主动注册实战指南。涵盖核心价值、标准化部署方案、性能优化及安全加固等内容,帮助企业在混合IT环境中实现高效监控。特别推荐使用主动注册功能简化大规模部署流程。

weixin_34095889的博客 385

OpenClaw Windows一键AI工作流平台:零基础部署AI Agent

AI Agent 是面向业务自动化的智能体执行范式,其核心在于将大模型能力封装为可编排、可触发、可监控的任务单元。实现稳定落地的关键在于运行时隔离与环境自包含——尤其在Windows桌面环境中,传统Python/Docker依赖管理极易失败。OpenClaw通过三层沙箱架构(物理层静态打包、运行时层进程守护、应用层YAML插件化),实现了真正开箱即用的AI工作流中枢。它支持飞书/钉钉/微信/邮件等主流办公协议接入,适用于自动化报表生成、合同归档、OCR解析、CRM数据同步等典型RPA+LLM混合场景,让非技

chongkuachan8070的博客 411

Windows 安装 ADB (Android Debug Bridge,Android 调试桥)

Windows 安装 ADB (Android Debug Bridge,Android 调试桥)

程永强 4万+

Hermes Agent跨平台部署指南:Windows与Linux通用实践

Docker容器部署本质上依赖于底层运行时契约,而非表面命令语法。当在Windows(通过WSL2)和Linux上运行基于Debian的Hermes Agent容器时,路径解析、UID/GID权限映射、文件系统挂载行为等核心机制存在关键差异。真正的‘跨平台通用’指同一套部署逻辑能在不同操作系统约束下达成一致行为结果,其技术价值在于保障Playwright浏览器自动化、Ollama本地模型接入等多模态能力稳定运行。典型应用场景包括私有化AI智能体部署、企业级Agent运维及多Profile工作流管理。本文聚焦

java天气 521

Jenkins在MLOps中的实战落地:Windows环境下的稳定CI/CD流水线搭建

MLOps流水线本质是数据、代码与模型参数的联合可复现交付体系,其核心挑战在于环境确定性、状态持久化与审计可追溯。Jenkins凭借对物理Agent的精细控制能力,在GPU绑定、本地数据路径固化、模型产物归档及企业内网安全策略穿透等关键场景中展现出不可替代性——尤其在Windows开发环境占主导的国内工业界。相比GitHub Actions等托管服务,Jenkins能保障训练环境版本锁定(如CUDA 12.1+Python 3.9.18)、避免跨平台路径/换行符陷阱,并通过customWorkspace和a

weixin_34288121的博客 436

Hermes Agent:轻量级前端部署代理与自动化实践指南

前端部署本质上是构建产物(如dist目录)向目标服务器的安全、可追溯交付过程,其核心挑战在于环境耦合、权限控制与操作可审计性。Hermes Agent并非CI/CD替代品,而是一个专注部署环节的轻量级代理服务,基于Node.js运行,通过Agent-Runner-Target三层解耦模型,实现Shell脚本驱动的标准化发布。它规避了Jenkins等传统工具的环境不可控风险,支持Windows与Linux双平台,天然适配Vue3、React18、Next.js等现代前端栈。本文围绕‘Windows安装’‘运行

weixin_33716941的博客 319

OpenClaw多Agent架构解析与本地部署指南

Agent系统是现代AI架构的重要发展方向,通过专业化分工实现任务的高效处理。其核心原理是将不同功能模块拆分为独立的Agent,每个Agent专注于特定领域任务,通过中央协调网关实现通信与协作。这种架构显著提升了任务处理效率和质量,特别适合复杂工作流场景。OpenClaw作为新一代AI Agent管理平台,采用微服务架构设计,支持多Agent协同工作,实测可缩短任务完成时间85%并提升输出质量40%以上。在技术实现上,OpenClaw提供全平台部署方案,包含Windows/Linux环境配置、多Agent

weixin_34072458的博客 429

Hermes Agent与OpenClaw三步部署实战指南

智能体(Agent)基础设施正从概念走向生产落地,其核心在于控制面、执行面与数据面的解耦协同。Hermes Agent作为轻量级Agent网关,负责路由调度与权限管控;OpenClaw则是模块化Skill执行引擎,支持多协议原子操作编排。二者组合构成可扩展、可观测、可运维的智能体运行时底座,技术价值体现在任务拆解自动化、服务编排标准化与跨环境一致性。典型应用场景包括企业内网AI工作流集成、私有化RAG管道调度、以及低代码智能助手后端支撑。本文聚焦真实环境下的可复现部署——覆盖Windows/macOS/Ub

csdn864883的博客 304

Hermes Agent容器化部署实战指南:从零到生产级配置

在当今的AI代理开发领域,环境一致性和部署效率是决定项目成功的关键因素。Hermes Agent作为一款功能强大的AI代理工具,支持工具调用、交互式CLI、消息集成和定时任务,通过Docker容器化部署能够显著提升开发体验和运维效率。本文将深入探讨Hermes Agent的**Docker容器化部署**、**生产环境配置**和**最佳实践**,帮助您从零开始构建稳定可靠的AI代理系统。 ## 为

gitblog_00106的博客 758

5分钟上手gh_mirrors/ss/ssh-agent:GitHub Actions私钥加载最佳实践

gh_mirrors/ss/ssh-agent是一款专为GitHub Actions设计的实用工具,它能够快速启动ssh-agent并加载私钥,帮助开发者在CI/CD流程中安全访问私有仓库。无论是拉取私有依赖、部署代码还是执行远程操作,这款工具都能让SSH密钥管理变得简单高效。 ## 🚀 为什么选择gh_mirrors/ss/ssh-agent? 在GitHub Actions工作流中,默认

gitblog_00643的博客 892

Hermes Agent:轻量级本地AI Agent运行时框架解析

AI Agent 是当前大模型落地的关键范式,其核心在于将模型能力与工具、数据、用户界面智能编排。Hermes Agent 并非训练或推理框架,而是一个面向终端用户的轻量级本地 AI Agent 运行时——它通过抽象模型接入(Ollama/Llama.cpp/vLLM)、内置向量存储适配与 Tauri 桌面壳封装,实现‘拖入文件→秒级RAG→导出结果’的闭环。技术价值体现在降低AI工程门槛:无需写Agent工作流代码,也无需部署复杂MLOps栈;典型应用场景包括金融波动归因、科研文档分析、法律合同比对等私有

weixin_34342207的博客 469
上一篇: mac 终端 常用命令
下一篇: 为什么不建议用Table布局
weixin_30318645
博客等级 码龄11年 110粉丝 0原创
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值