我正在尝试解决与语言相关的 Office 365 问题。在支持文章https://community.office365.com/en-us/f/148/t/205002 中,说在使用 dirsync 填充 O365 租户时应该设置 preferredLanguage 属性。目前我们的 AD 中没有设置。这个字段的正确格式是什么?
我试过 en-us,这似乎不起作用。我看到其他参考文献说它应该是美国英语。在某处是否有描述选项是什么或此 AD 属性的格式的参考?
我有一个使用SQL 2005返回正确结果集的查询.它如下:
select
case
when convert(varchar(4),datepart(yyyy,bug.datecreated),101)+ ' Q' +convert(varchar(2),datepart(qq,bug.datecreated),101) = '1969 Q4' then '2009 Q2'
else convert(varchar(4),datepart(yyyy,bug.datecreated),101)+ ' Q' +convert(varchar(2),datepart(qq,bug.datecreated),101)
end as [Quarter],
bugtypes.bugtypename,
count(bug.bugid) as [Total]
from bug left outer join bugtypes on bug.crntbugtypeid = bugtypes.bugtypeid and bug.projectid = bugtypes.projectid
where
(bug.projectid = 44
and bug.currentowner in (-1000000031,-1000000045)
and bug.crntplatformid in (42,37,25,14))
or
(bug.projectid = 44
and bug.currentowner in (select memberid from groupmembers where projectid = 44 and groupid in (87,88))
and bug.crntplatformid in (42,37,25,14))
group by
case
when … 我正在使用 PowerShell 编写脚本,并且在使用枚举类型时遇到了困难。我对 SharePoint Online 执行 REST 调用以获取有关特定组的信息。
$group = Invoke-SPORestMethod -Url "https://tenant.sharepoint.com/sites/site/_api/web/RoleAssignments/GetByPrincipalId(8)?`$expand=RoleDefinitionBindings"
$group.RoleDefinitionBindings.results[0].RoleTypeKind
Run Code Online (Sandbox Code Playgroud)
它返回一个 int,RoleTypeKind,它是 [Microsoft.SharePoint.Client.RoleType]. 我无法访问关联枚举值的 name 属性。我目前正在这样做,但似乎非常错误:
function getGroupPermissionKind([int]$roleType){
#https://msdn.microsoft.com/en-us/library/office/microsoft.sharepoint.client.roletype.aspx
[Enum]::GetValues([Microsoft.SharePoint.Client.RoleType]) | foreach {
$Name = $_
$Value = ([Microsoft.SharePoint.Client.RoleType]::$_).value__
if ($Value -eq $roleType){
return $Name
}
}
}
Run Code Online (Sandbox Code Playgroud)
知道$group.RoleDefinitionBindings.results[0].RoleTypeKind返回枚举的正确 int 后,我如何更直接地访问枚举的名称,而不是使用我提出的看似笨拙的实现?