在管理模式下运行Powershell脚本 - 设置机器级别环境。变量
Hello Everyone
Hello Everyone
有没有办法在TFS 2017中的admin中运行powershell脚本?
Is there a way to run the powershell script in admin in TFS 2017?
我正在添加任务并且脚本是内联的,我想设置机器级环境变量,但我得到注册表访问被拒绝错误。
I am adding a task and the script is inline and I want to set a machine level environment variable, but I get registry access denied error.
谢谢
WPF_Dev,
Hi WPF_Dev,
感谢您在此发帖。
任务由代理服务帐户执行。因此,您可以尝试将权限设置为代理服务帐户的系统管理员。
The task was executed by Agent service account. So, you can try to set permissions as system admin for the Agent service account.
"机器级环境变量"的含义是什么?你的意思是你想要设置Windows系统环境变量吗?
What’s that mean for ‘’machine level environment variable’’? Do you mean that you want to set Windows system environment variables?
通常,使用PowerShell任务设置变量只需在构建过程中设置变量值,它不会设置值构建定义级别或系统级别。
Normally, set variables with PowerShell task can just set the variable value in the build process, it doesn't set the value in the build definition level or system level.
请参考以下主题:
最好的问候。