【问题标题】:PowerShell method for retrieving Sync Type of Office 365 Users?用于检索 Office 365 用户同步类型的 PowerShell 方法?
【发布时间】:2017-01-31 15:28:36
【问题描述】:
在 portal.office.com 上,活动用户列表显示一个“同步类型”列,可以是“与 Active Directory 同步”或“在云中”。是否可以使用 PowerShell 检索此“同步类型”作为 Azure AD 用户的属性(例如使用 Get-MsolUser)。
另外,是否可以强制标记为“在云中”的用户与具有相同 userPrincipalName 的本地 Active Directory 用户同步?
【问题讨论】:
标签:
powershell
azure
active-directory
office365
azure-active-directory
【解决方案1】:
同步类型是办公应用程序的属性,而不是 AzureAD 用户的属性。因此,您无法以这种方式检索它。
只要用户名是唯一的,就可以在 AzureAD 中同步用户。
【解决方案3】:
要查找仅限云的用户和组:
用户:
Get-AzureADUser -all $true | ? {$_.OnPremisesSecurityIdentifier -eq $null}
组:
Get-AzureADGroup -all $true | ? {$_.OnPremisesSecurityIdentifier -eq $null -and $_.SecurityEnabled -eq $true }