【问题标题】:VSTS get the user's group from a releaseVSTS 从发布中获取用户组
【发布时间】:2018-02-26 12:45:40
【问题描述】:

我正在做一个将在一个版本中运行的 powershell 脚本,我想知道如何从登录的用户那里获取组(来自版本)

【问题讨论】:

  • 你能解释一下你在这里试图解决的问题,而不是你认为会解决的问题吗?

标签: powershell azure-devops release


【解决方案1】:

为什么必须从发布过程中获取用户组?

根据我的测试,我们可以使用 TFSSecurity.exe 工具获取特定用户的群组。详情请见/im: Display information about identities that compose direct membership。

你可以运行下面的PowerShell脚本来获取用户的组:

Set-Alias TFSSecurity "C:\Program Files (x86)\Microsoft Visual Studio\2017\Enterprise\Common7\IDE\CommonExtensions\Microsoft\TeamFoundation\Team Explorer\TFSSecurity.exe"

TFSSecurity /im /collection:https://instance.visualstudio.com n:"instance@hotmail.com"

我在 TFS 上测试了脚本,它按预期工作。但不适用于 VSTS。

但是,当它在任何登录 VSTS 的机器上本地运行时,它可以工作。

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-03-10
    • 2015-04-13
    • 2018-12-25
    • 1970-01-01
    相关资源
    最近更新 更多