如何使用 Powershell 将自定义应用设置策略分配给组中的用户?



如何使用Powershell将自定义应用设置策略分配给组中的用户?

将自定义应用设置策略分配给组中的用户

1.安装模块 - 名称 AzureAD

/*Skype for Business Online,Windows PowerShell 模块可以下载并安装 */

Import-Module SkypeOnlineConnector
$userCredential = Get-Credential $sfbSession = New-CsOnlineSession -Credential $userCredential Import-PSSession $sfbSession
connect-AzureAD -Credential $userCredential
$group = Get-AzureADGroup -SearchString "TeamsApp"
$members = Get-AzureADGroupMember -ObjectId $group.ObjectId -All $true | Where-Object {$_.ObjectType -eq "User"}
$members | ForEach-Object { Grant-CsTeamsAppSetupPolicy -PolicyName "Teams App Policy Test" -Identity $_.UserPrincipalName}

Skype for Business Online、Windows PowerShell 模块 https://www.microsoft.com/en-us/download/details.aspx?id=39366 的安装文件

参考

https://learn.microsoft.com/en-us/microsoftteams/teams-app-setup-policies

https://learn.microsoft.com/en-us/microsoftteams/teams-powershell-overview

https://learn.microsoft.com/en-us/office365/enterprise/powershell/connect-to-all-office-365-services-in-a-single-windows-powershell-window

https://learn.microsoft.com/en-us/skypeforbusiness/set-up-your-computer-for-windows-powershell/set-up-your-computer-for-windows-powershell

https://learn.microsoft.com/en-us/office365/enterprise/powershell/manage-skype-for-business-online-with-office-365-powershell

最新更新