簡體   English   中英

Azure Devops 使用 Powershell 從特定組織中刪除特定用戶

[英]Azure Devops remove specific user from specific organization using Powershell

例如,我想從 Azure 開發組織 BigZoo 中移除 Tiger(Tiger 有 3 個 Azure 組織、BigZoo、SmallZoo、middleZoo——我只想從 BigZoo 中移除 Tiger)

在 Azure Cloudshell Powershell 中使用此 Azure CLI 將正常工作

az devops user remove --user tiger
                      [--org BigZoo]
                      [--yes]

But it does not work in Azure function-->Azure function use PowerShell environment--> CloudPowerShell can read AzureCLi but Powershell In AzureFunction cannot read anything related with Az

因此,如果我只想使用 powershell 而沒有 Azure CLI 的任何幫助,則有一些模塊,但所有導入的模塊都是從所有組織中刪除用戶--> 不從特定組織中刪除用戶

有什么建議嗎? 從特定 AzureDevops 組織中刪除用戶。 使用 API 似乎太復雜了。 有什么好主意嗎? 謝謝

我沒有嘗試過,但是有Z2F2D399F0EA884859FE555514B304733BZ MODULE中的Z3D265B4E1EEF1788881FA003B18B18B18CCCZ GALLER包含Z3A580F14222077F14223677F1377F1367F137F137F151F137F151FAPEST1F151FAPEST1FAPEST1FAPEST1FAPEST1FAPEST。

這有一個名為:Remove-VSTeamUserEntitlement 的 function

此處的文檔: https://methodsandpractices.github.io/vsteam-docs/docs/modules/vsteam/commands/Remove-VSTeamUserEntitlement

此處的模塊: https://www.powershellgallery.com/packages/VSTeam/

將該模塊添加到 azure 函數項目的Requirements.psd1文件中,您應該可以使用它。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM