[英]How to Assign a custom app setup policy to users in a group using Powershell?
How to Assign a custom app setup policy to users in a group using Powershell?如何使用 Powershell 为组中的用户分配自定义应用程序设置策略?
Assigning a custom app setup policy to users in a group将自定义应用程序设置策略分配给组中的用户
1.Install-Module -Name AzureAD 1.Install-Module -Name AzureAD
/*Skype for Business Online, Windows PowerShell Module can be downloaded and installed */ /*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}
Installation file for Skype for Business Online, Windows PowerShell Module https://www.microsoft.com/en-us/download/details.aspx?id=39366 Skype for Business Online 的安装文件,Windows PowerShell 模块https://www.microsoft.com/en-us/download/details.aspx?id=3936
Reference参考
https://docs.microsoft.com/en-us/microsoftteams/teams-app-setup-policies https://docs.microsoft.com/en-us/microsoftteams/teams-app-setup-policies
https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-overview https://docs.microsoft.com/en-us/microsoftteams/teams-powershell-overview
https://docs.microsoft.com/en-us/office365/enterprise/powershell/connect-to-all-office-365-services-in-a-single-windows-powershell-window https://docs.microsoft.com/en-us/office365/enterprise/powershell/connect-to-all-office-365-services-in-a-single-windows-powershell-window
https://docs.microsoft.com/en-us/skypeforbusiness/set-up-your-computer-for-windows-powershell/set-up-your-computer-for-windows-powershell https://docs.microsoft.com/en-us/skypeforbusiness/set-up-your-computer-for-windows-powershell/set-up-your-computer-for-windows-powershell
https://docs.microsoft.com/en-us/office365/enterprise/powershell/manage-skype-for-business-online-with-office-365-powershell https://docs.microsoft.com/en-us/office365/enterprise/powershell/manage-skype-for-business-online-with-office-365-powershell
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.