Get-TeamUser和Get-TeamChannelUser之间的区别:

huangapple go评论72阅读模式
英文:

MicrosoftTeamsPowerShell module: Difference between Get-TeamUser and Get-TeamChannelUser

问题

I don't understand the difference between the two cmdlets

Get-TeamUser

and

Get-TeamChannelUser

(and respectively also the add-... version).

I am currently trying to manage a Team with 1500+ participients (mostly added from a flow w/o scripting) and have ended up with...

(Get-TeamUser -GroupId deadbeef-dead-beaf-1234-1234567890ab).count 1570

(Get-TeamChannelUser -GroupId deadbeef-dead-beaf-1234-1234567890ab -DisplayName General).count 1498

So, just to enlighten me: Add-TeamUser will have to be followed by Add-TeamChanneluser for each channel in the team?

英文:

I don't understand the difference between the two cmdlets

Get-TeamUser

and

Get-TeamChannelUser

(and respectively also the add-... version).

I am currently trying to manage a Team with 1500+ participients (mostly added from a flow w/o scripting) and have ended up with...

(Get-TeamUser -GroupId deadbeef-dead-beaf-1234-1234567890ab).count
1570

(Get-TeamChannelUser -GroupId deadbeef-dead-beaf-1234-1234567890ab -DisplayName General).count
1498

So, just to enlighten me: Add-TeamUser will have to be followed by Add-TeamChanneluser for each channel in the team?

答案1

得分: 2

Get-TeamUser 用于检索直接添加为 Microsoft Teams 团队成员的用户列表。

Get-TeamChannelUser 用于检索已经专门添加为 Microsoft Teams 团队内特定频道成员的用户列表。

如果您想要将用户添加到团队中,您可以使用 Add-TeamUser 命令。这将会将用户添加为团队成员。如果您想要将用户专门添加到团队内的频道,您需要在将他们添加为团队成员之后使用 Add-TeamChannelUser 命令。这将允许您授予他们访问特定频道的权限。

参考文档:

  1. https://learn.microsoft.com/en-us/powershell/module/teams/get-teamuser?view=teams-ps
  2. https://learn.microsoft.com/en-us/powershell/module/teams/get-teamchanneluser?view=teams-ps
英文:

Get-TeamUser is used to retrieve the users who are members of a specific Microsoft Teams team. It gives you a list of all users who are directly added as members to the team.

Get-TeamChannelUser is used to retrieve the users who have been specifically added as members to a particular channel within a Microsoft Teams team. It allows you to view the users who have been added to a specific channel within the team.

If you want to add a user to the team, you can use the Add-TeamUser cmdlet. This will add the user as a member of the team. If you want to add the user specifically to a channel within the team, you would need to use the Add-TeamChannelUser cmdlet after adding them as a member of the team. This allows you to grant them access to the specific channel.

Ref Doc:

  1. https://learn.microsoft.com/en-us/powershell/module/teams/get-teamuser?view=teams-ps
  2. https://learn.microsoft.com/en-us/powershell/module/teams/get-teamchanneluser?view=teams-ps

huangapple
  • 本文由 发表于 2023年7月6日 17:06:39
  • 转载请务必保留本文链接:https://go.coder-hub.com/76627209.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定